@Override
    public boolean equals(final Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj == null || !(obj instanceof CriteriaSet)) {
            return false;
        }

        @SuppressWarnings("unchecked") final CriteriaSet<T> criteriaSet = (CriteriaSet<T>) obj;

        final EqualsBuilder builder = new EqualsBuilder();
        builder.append(this.matchNull, criteriaSet.matchNull);
        builder.append(this.matchAll, criteriaSet.matchAll);
        builder.append(this.set, criteriaSet.set);
        return builder.isEquals();
    }
By default the criteria will match anything. NULL matchAll implies match
anything when nothing is in the set or we are to not matchNull. By
setting match all it will match all regardless.
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/CriteriaSet.java