GATE
Version 3.1-2270

gate.util
Class ObjectComparator

java.lang.Object
  extended by gate.util.ObjectComparator
All Implemented Interfaces:
Comparator

public class ObjectComparator
extends Object
implements Comparator

A Comparator implementation for Object values. If the values provided are not comparable, then they are converted to String and the String values are compared. This utility is useful for GUI components that need to sort their contents.


Constructor Summary
ObjectComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compares two 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
 

Constructor Detail

ObjectComparator

public ObjectComparator()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares two objects.

Specified by:
compare in interface Comparator

GATE
Version 3.1-2270