public class ObjectComparators extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator |
NATURAL_COMPARATOR
A type-specific comparator mimicking the natural order.
|
static Comparator |
OPPOSITE_COMPARATOR
A type-specific comparator mimicking the opposite of the natural order.
|
Modifier and Type | Method and Description |
---|---|
static <K> Comparator<K> |
oppositeComparator(Comparator<K> c)
Returns a comparator representing the opposite order of the given comparator.
|
public static final Comparator NATURAL_COMPARATOR
public static final Comparator OPPOSITE_COMPARATOR
public static <K> Comparator<K> oppositeComparator(Comparator<K> c)
c
- a comparator.c
.