Package net.i2p.kademlia
Class XORComparator<T extends SimpleDataStructure>
java.lang.Object
net.i2p.kademlia.XORComparator<T>
- All Implemented Interfaces:
Serializable,Comparator<T>
public class XORComparator<T extends SimpleDataStructure>
extends Object
implements Comparator<T>, Serializable
Help sort Hashes in relation to a base key using the XOR metric
- Since:
- 0.9.2 in i2psnark, moved to core in 0.9.10
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
XORComparator
- Parameters:
target- key to compare distances with
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends SimpleDataStructure>
-