gate.gui
Class ListEditorDialog.NaturalComparator
java.lang.Object
gate.gui.ListEditorDialog.NaturalComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- ListEditorDialog
protected class ListEditorDialog.NaturalComparator
- extends Object
- implements Comparator
A comparator that uses the objects' natural order if the item
class of the collection implements Comparable, and compares
their toString
representations if not.
null
is always treated as less than anything
non-null
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListEditorDialog.NaturalComparator
protected ListEditorDialog.NaturalComparator()
compare
public int compare(Object a,
Object b)
- Specified by:
compare
in interface Comparator