8 * Returns the count of things that are in one or other of two sets but not in
9 * both. The sets are not modified.
15 public static int countDisjunction(Set<? extends Object> set1,
16 Set<? extends Object> set2)
20 return set2 == null ? 0 : set2.size();
27 int size1 = set1.size();
28 int size2 = set2.size();
29 Set<? extends Object> smallerSet = size1 < size2 ? set1 : set2;
30 Set<? extends Object> largerSet = (smallerSet == set1 ? set2 : set1);
32 for (Object k : smallerSet)
34 if (largerSet.contains(k))
40 int notInCommon = (size1 - inCommon) + (size2 - inCommon);