public final class ObjectComparators
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ObjectComparators.NaturalImplicitComparator
A type-specific comparator mimicking the natural order.
|
protected static class |
ObjectComparators.OppositeComparator<K> |
protected static class |
ObjectComparators.OppositeImplicitComparator
A type-specific comparator mimicking the opposite of the natural order.
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator |
NATURAL_COMPARATOR |
static java.util.Comparator |
OPPOSITE_COMPARATOR |
| Modifier and Type | Method and Description |
|---|---|
static <K> java.util.Comparator<K> |
asObjectComparator(java.util.Comparator<K> c)
Returns a the comparator given unmodified.
|
static <K> java.util.Comparator<K> |
oppositeComparator(java.util.Comparator<K> c)
Returns a comparator representing the opposite order of the given comparator.
|
public static final java.util.Comparator NATURAL_COMPARATOR
public static final java.util.Comparator OPPOSITE_COMPARATOR
public static <K> java.util.Comparator<K> oppositeComparator(java.util.Comparator<K> c)
c - a comparator.c.public static <K> java.util.Comparator<K> asObjectComparator(java.util.Comparator<K> c)
c - a comparator, or null.c, unmodified.