org.planx.routing.kademlia
Class Node.FirstSeenComparator
java.lang.Object
org.planx.routing.kademlia.Node.FirstSeenComparator
- All Implemented Interfaces:
- Comparator<Node>
- Enclosing class:
- Node
public static class Node.FirstSeenComparator
- extends Object
- implements Comparator<Node>
A FirstSeenComparator is capable of comparing Node objects according to
time first seen.
|
Method Summary |
int |
compare(Node n1,
Node n2)
Compare two objects which must both be of type Node
and determine which is seen first. |
Node.FirstSeenComparator
public Node.FirstSeenComparator()
compare
public int compare(Node n1,
Node n2)
- Compare two objects which must both be of type
Node
and determine which is seen first. If o1 is seen before
o2 a negative integer is returned, etc.
- Specified by:
compare in interface Comparator<Node>
Copyright © 2004-2005 Plan-X. All Rights Reserved.