public interface IntComparator
extends java.util.Comparator<java.lang.Integer>
| Modifier and Type | Interface and Description |
|---|---|
static class |
IntComparator.Reversed
A Type Specific Reversed Comparator to reduce boxing/unboxing
|
| Modifier and Type | Method and Description |
|---|---|
default int |
compare(java.lang.Integer o1,
java.lang.Integer o2)
Deprecated.
Please use the corresponding type-specific function instead.
|
int |
compare(int o1,
int o2)
Type-Specific compare function to reduce (un)boxing
|
static IntComparator |
of(java.util.Comparator<java.lang.Integer> c)
A Wrapper function to convert a Non-Type-Specific Comparator to a Type-Specific-Comparator
|
default IntComparator |
reversed() |
int compare(int o1,
int o2)
o1 - the first object to be compared.o2 - the second object to be compared.Comparator.compare(Object, Object)@Deprecated
default int compare(java.lang.Integer o1,
java.lang.Integer o2)
This default implementation delegates to the corresponding type-specific function.
compare in interface java.util.Comparator<java.lang.Integer>static IntComparator of(java.util.Comparator<java.lang.Integer> c)
c - comparator to convertjava.lang.NullPointerException - if the comparator is nulldefault IntComparator reversed()
reversed in interface java.util.Comparator<java.lang.Integer>