@FunctionalInterface
public interface IntComparator
extends java.util.Comparator<java.lang.Integer>
Comparator
; provides methods to compare two primitive types both as objects
and as primitive types.
Note that fastutil
provides a corresponding abstract class that
can be used to implement this interface just by specifying the type-specific
comparator.
Comparator
Modifier and Type | Method and Description |
---|---|
default int |
compare(java.lang.Integer ok1,
java.lang.Integer ok2)
Deprecated.
Please use the corresponding type-specific method instead.
|
int |
compare(int k1,
int k2)
Compares its two primitive-type arguments for order.
|
default IntComparator |
reversed() |
default java.util.Comparator<java.lang.Integer> |
thenComparing(java.util.Comparator<? super java.lang.Integer> second) |
default IntComparator |
thenComparing(IntComparator second)
Return a new comparator that first uses this comparator, then uses the second comparator
if this comparator compared the two elements as equal.
|
int compare(int k1, int k2)
Comparator
default IntComparator reversed()
reversed
in interface java.util.Comparator<java.lang.Integer>
@Deprecated default int compare(java.lang.Integer ok1, java.lang.Integer ok2)
compare
in interface java.util.Comparator<java.lang.Integer>
default IntComparator thenComparing(IntComparator second)
Comparator.thenComparing(Comparator)
default java.util.Comparator<java.lang.Integer> thenComparing(java.util.Comparator<? super java.lang.Integer> second)
thenComparing
in interface java.util.Comparator<java.lang.Integer>