org.tm4j.topicmap.utils
Class BaseNameComparator

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

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


Constructor Summary
BaseNameComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two BaseName 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

BaseNameComparator

public BaseNameComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two BaseName objects on their signature string. Two BaseNames with the same name string in the same scope will compare as equal. Two BaseNames with different name strings will compare on the lexical order of the name string Two BaseNames with the same name string in different scopes will sort in an arbitrary but consistent order.

Specified by:
compare in interface java.util.Comparator