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