public abstract class AbstractLongComparator extends Object implements LongComparator
To create a type-specific comparator you need both a method comparing primitive types and a method comparing objects. However, if you have the first one you can just inherit from this class and get for free the second one.
Comparator
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(long k1,
long k2)
Compares the given primitive types.
|
int |
compare(Long ok1,
Long ok2) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public int compare(Long ok1, Long ok2)
compare
in interface Comparator<Long>
public abstract int compare(long k1, long k2)
LongComparator
compare
in interface LongComparator
Comparator