Class ObjectIdComparator

java.lang.Object
net.ontopia.topicmaps.utils.ObjectIdComparator
All Implemented Interfaces:
Comparator<TMObjectIF>

public class ObjectIdComparator extends Object implements Comparator<TMObjectIF>
INTERNAL: Comparator that compares object ids of TMObjectIF objects.
  • Field Details

  • Constructor Details

    • ObjectIdComparator

      public ObjectIdComparator()
  • Method Details

    • compare

      public int compare(TMObjectIF obj1, TMObjectIF obj2)
      INTERNAL: compares the object ids of the given objects
      Specified by:
      compare in interface Comparator<TMObjectIF>
      Parameters:
      obj1 - TMObjectIF
      obj2 - 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