org.klomp.snark.dht
Class NodeInfoComparator

java.lang.Object
  extended by org.klomp.snark.dht.NodeInfoComparator
All Implemented Interfaces:
Comparator<NodeInfo>

 class NodeInfoComparator
extends Object
implements Comparator<NodeInfo>

Closest to a InfoHash or NID key. Use for NodeInfos.

Since:
0.9.2
Author:
zzz

Constructor Summary
NodeInfoComparator(SHA1Hash h)
           
 
Method Summary
 int compare(NodeInfo lhs, NodeInfo rhs)
           
 
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

NodeInfoComparator

public NodeInfoComparator(SHA1Hash h)
Method Detail

compare

public int compare(NodeInfo lhs,
                   NodeInfo rhs)
Specified by:
compare in interface Comparator<NodeInfo>