The SetComparer Class of the com.ms.util package compares sets that cannot be subtracted or otherwise have no "inverse" operator.
public final class SetComparer { // Methods public static int compareSets(ProvideSetComparisonInfo set1 ProvideSetComparisonInfo set2); }
The pseudo-set implements ProvideSetComparisonInfo and consists of two sets that together dictate membership.
The include set defines an enclosing set for all possible members of the set, and the exclude set defines members of the enclosing set that are removed.
Three basic operations are supported on the two sets using this class.
The compareSets operator method makes the assumption that is relatively inexpensive to compute and an intersection is relatively expensive. The include set is assumed to be an inclusive superset of the exclude set (otherwise, incorrect results might be returned). Because comparison is typically expensive, the invariant is not checked.