public abstract class AbstractIntComparator extends java.lang.Object implements IntComparator
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 |
---|---|
int |
compare(java.lang.Integer ok1,
java.lang.Integer ok2) |
abstract int |
compare(int k1,
int k2)
Compares the given primitive types.
|
public int compare(java.lang.Integer ok1, java.lang.Integer ok2)
compare
in interface java.util.Comparator<java.lang.Integer>
public abstract int compare(int k1, int k2)
IntComparator
compare
in interface IntComparator
Comparator