gate.gui
Class ListEditorDialog.NaturalComparator

java.lang.Object
  extended by 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.


Constructor Summary
protected ListEditorDialog.NaturalComparator()
           
 
Method Summary
 int compare(Object a, Object b)
           
 
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

ListEditorDialog.NaturalComparator

protected ListEditorDialog.NaturalComparator()
Method Detail

compare

public int compare(Object a,
                   Object b)
Specified by:
compare in interface Comparator