T
- the type of comparable objects that may be compared by this comparatorpublic class ComparableComparator<T extends Comparable<T>> extends Object implements Comparator<T>
Comparable
Modifier and Type | Field and Description |
---|---|
static ComparableComparator |
INSTANCE
A shared instance of this default comparator.
|
Constructor and Description |
---|
ComparableComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final ComparableComparator INSTANCE
Comparators.comparable()
public int compare(T o1, T o2)
compare
in interface Comparator<T extends Comparable<T>>