uk.ac.starlink.connect
Class NodeComparator
java.lang.Object
uk.ac.starlink.connect.NodeComparator
- All Implemented Interfaces:
- Comparator
- public class NodeComparator
- extends Object
- implements Comparator
Comparator for nodes. It returns all Branch nodes first, followed
by all Leaf nodes. Within each group, items are ordered alphabetically.
- Since:
- 25 Feb 2005
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeComparator
public NodeComparator()
getInstance
public static NodeComparator getInstance()
- Returns an instance of this class.
getCollator
public Collator getCollator()
- Returns the collator used to perform alphabetic ordering.
May be overridden to modify behaviour.
- Returns:
- collator
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare
in interface Comparator