org.tm4j.topicmap.utils
Class OccurrenceComparator

java.lang.Object
  extended byorg.tm4j.topicmap.utils.OccurrenceComparator
All Implemented Interfaces:
java.util.Comparator

public class OccurrenceComparator
extends java.lang.Object
implements java.util.Comparator


Constructor Summary
OccurrenceComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two Occurrence objects on their signature string.
 
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
equals
 

Constructor Detail

OccurrenceComparator

public OccurrenceComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two Occurrence objects on their signature string. Two Occurrences of the same type with the same data or data locator in the same scope will compare as equal. Two Occurrences which are not equal will sort in an arbitrary, but consistent, order.

Specified by:
compare in interface java.util.Comparator