T - the type of objects that may be compared by this
Comparator.public class ComparableComparator<T extends Comparable> extends Object implements Comparator<T>
Comparator for Comparable objects. It simply delegates to
Comparable.compareTo(Object).| Modifier and Type | Field and Description |
|---|---|
private static ComparableComparator |
INSTANCE |
| Constructor and Description |
|---|
ComparableComparator()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2) |
static <T extends Comparable<T>> |
getInstance() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprivate static final ComparableComparator INSTANCE
public int compare(T o1, T o2)
compare in interface Comparator<T extends Comparable>public static <T extends Comparable<T>> Comparator<T> getInstance()
T - the type of objects that may be compared by this
Comparator.ComparableComparator.Copyright © 2001–2016 mmm-Team. All rights reserved.