public static boolean valueChanged(Set<?> before, Set<?> after) {
        if (after == null) {
            return false;
        }
        if (before == null) {
            return !after.isEmpty();
        } else {
            if (before.size() != after.size()) {
                return true;
            }
            for (Object bean : after) {
                if (!before.contains(bean)) {
                    return true;
                }
            }
        }
        return false;
    }
Returns true only if the set has changed.

@param before the value before change
@param after the value after change
@return true if value changed, else false
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java