@FunctionalInterface public interface IntComparator extends Comparator<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(Integer ok1,
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 Comparator<Integer> |
thenComparing(Comparator<? super 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.
|
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reverseOrder, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongint compare(int k1,
int k2)
Comparatordefault IntComparator reversed()
reversed in interface Comparator<Integer>@Deprecated default int compare(Integer ok1, Integer ok2)
This implementation delegates to the corresponding type-specific method.
compare in interface Comparator<Integer>default IntComparator thenComparing(IntComparator second)
Comparator.thenComparing(Comparator)default Comparator<Integer> thenComparing(Comparator<? super Integer> second)
thenComparing in interface Comparator<Integer>Copyright © 2020. All rights reserved.