public class XORComparator<T extends SimpleDataStructure> extends Object implements Comparator<T>, Serializable
Constructor and Description |
---|
XORComparator(T target) |
Modifier and Type | Method and Description |
---|---|
int |
compare(T lhs,
T rhs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public XORComparator(T target)
target
- key to compare distances withpublic int compare(T lhs, T rhs)
compare
in interface Comparator<T extends SimpleDataStructure>