Comparable
| Modifier and Type | Field and Description |
|---|---|
| public static final ComparableComparator | INSTANCE
References Deprecated
A shared instance of this default comparator.
ComparableComparator is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(T
the first object to be compared. o1, T the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| INSTANCE | back to summary |
|---|---|
| public static final ComparableComparator<T extends Comparable<T>> INSTANCE
References Deprecated
See corresponding docs for further information. A shared instance of this default comparator.
| |
| ComparableComparator | back to summary |
|---|---|
| public ComparableComparator() | |
| compare | back to summary |
|---|---|
| public int compare(T o1, T o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |