Class CXTMTopicMapWriter.AbstractSetComparator<T>

  extended by<T>
All Implemented Interfaces:
Direct Known Subclasses:
CXTMTopicMapWriter.LocatorSetComparator, CXTMTopicMapWriter.RoleSetComparator, CXTMTopicMapWriter.ScopeComparator
Enclosing class:

private abstract class CXTMTopicMapWriter.AbstractSetComparator<T>
extends java.lang.Object
implements java.util.Comparator<java.util.Set<T>>

Comparator which compares the size of the provided set. Iff the size of the sets are equal, another comparison method is used to compare the content of the sets.

Constructor Summary
private CXTMTopicMapWriter.AbstractSetComparator()
Method Summary
 int compare(java.util.Set<T> o1, java.util.Set<T> o2)
(package private) abstract  int compareContent(java.util.Set<T> o1, java.util.Set<T> o2, int size)
          Called iff the size of the sets is equal.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator

Constructor Detail


private CXTMTopicMapWriter.AbstractSetComparator()
Method Detail


public int compare(java.util.Set<T> o1,
                   java.util.Set<T> o2)
Specified by:
compare in interface java.util.Comparator<java.util.Set<T>>


abstract int compareContent(java.util.Set<T> o1,
                            java.util.Set<T> o2,
                            int size)
Called iff the size of the sets is equal. This method is used to compare the content of the sets.

o1 - The first set.
o2 - The second set.
size - The size of the set(s).
A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.