net.ontopia.topicmaps.utils
Class ObjectIdComparator

java.lang.Object
  extended by net.ontopia.topicmaps.utils.ObjectIdComparator
All Implemented Interfaces:
java.util.Comparator

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

INTERNAL: Comparator that compares object ids of TMObjectIF objects.


Field Summary
static ObjectIdComparator INSTANCE
           
 
Constructor Summary
ObjectIdComparator()
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          INTERNAL: compares the object ids of the given objects
 
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
 

Field Detail

INSTANCE

public static final ObjectIdComparator INSTANCE
Constructor Detail

ObjectIdComparator

public ObjectIdComparator()
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
INTERNAL: compares the object ids of the given objects

Specified by:
compare in interface java.util.Comparator
Parameters:
obj1 - object; internally typecast to TMObjectIF
obj2 - object; internally typecast to TMObjectIF
Returns:
int; 0 if the two objects have the same object id; otherwise positive/negative according to compareTo on the (string) values of the object ids


Copyright © 2000-2012 Ontopia.