gate.util
Class ObjectComparator
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectComparator
public ObjectComparator()
compare
public int compare(Object o1,
Object o2)
- Compares two objects.
- Specified by:
compare
in interface Comparator