org.planx.xmlstore.routing
Class Node.DistanceComparator
java.lang.Object
org.planx.xmlstore.routing.Node.DistanceComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- Node
public static class Node.DistanceComparator
- extends Object
- implements Comparator
A DistanceComparator is capable of comparing Node objects according to
closeness to a predetermined identifier using the XOR metric.
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compare two objects which must both be of type Node
and determine which is closest to the identifier specified in the
constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Node.DistanceComparator
public Node.DistanceComparator(Identifier relId)
- The identifier relative to which the distance should be measured.
compare
public int compare(Object o1,
Object o2)
- Compare two objects which must both be of type
Node
and determine which is closest to the identifier specified in the
constructor.
- Specified by:
compare in interface Comparator
Copyright © 2010. All Rights Reserved.