| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Ordering | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(T
the first object to be compared. a, T the second object to be compared. b)Implements abstract com. Implements java. |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. Implements java. |
| public int | |
| public <E extends T> E | max(E
value to compare, returned if greater than or equal to b. a, E value to compare. b)Overrides com. |
| public <E extends T> E | max(E
value to compare, returned if greater than or equal to the rest. a, E value to compare b, E value to compare c, E... values to compare rest)Overrides com. |
| public <E extends T> E | max(Iterator<E>
the iterator whose maximum element is to be determined iterator)Overrides com. |
| public <E extends T> E | max(Iterable<E>
the iterable whose maximum element is to be determined iterable)Overrides com. |
| public <E extends T> E | min(E
value to compare, returned if less than or equal to b. a, E value to compare. b)Overrides com. |
| public <E extends T> E | min(E
value to compare, returned if less than or equal to the rest. a, E value to compare b, E value to compare c, E... values to compare rest)Overrides com. |
| public <E extends T> E | min(Iterator<E>
the iterator whose minimum element is to be determined iterator)Overrides com. |
| public <E extends T> E | min(Iterable<E>
the iterable whose minimum element is to be determined iterable)Overrides com. |
| public <S extends T> Ordering | reverse()
Overrides com. Ordering equivalent to Collections#reverseOrder(Comparator).
|
| public String |
| forwardOrder | back to summary |
|---|---|
| pack-priv final Ordering<? super T> forwardOrder | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ReverseOrdering | back to summary |
|---|---|
| pack-priv ReverseOrdering(Ordering<? super T> forwardOrder) | |
| compare | back to summary |
|---|---|
| public int compare(T a, T b) Implements abstract com. 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
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Implements java. Doc from java. Indicates whether some other object is "equal to"
this comparator. This method must obey the general contract of
Note that it is always safe not to override
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| max | back to summary |
|---|---|
| public <E extends T> E max(E a, E b) Overrides com. Doc from com. Returns the greater of the two values according to this ordering. If the values compare as 0, the first is returned. Implementation Note this method is invoked by the default implementations of the
other Note Consider using
| |
| max | back to summary |
|---|---|
| public <E extends T> E max(E a, E b, E c, E... rest) Overrides com. Doc from com. Returns the greatest of the specified values according to this ordering. If there are multiple greatest values, the first of those is returned. Java 8 users: Use
| |
| max | back to summary |
|---|---|
| public <E extends T> E max(Iterator<E> iterator) Overrides com. Doc from com. Returns the greatest of the specified values according to this ordering. If there are multiple
greatest values, the first of those is returned. The iterator will be left exhausted: its
Java 8 users: Use | |
| max | back to summary |
|---|---|
| public <E extends T> E max(Iterable<E> iterable) Overrides com. Doc from com. Returns the greatest of the specified values according to this ordering. If there are multiple greatest values, the first of those is returned. Java 8 users: If | |
| min | back to summary |
|---|---|
| public <E extends T> E min(E a, E b) Overrides com. Doc from com. Returns the lesser of the two values according to this ordering. If the values compare as 0, the first is returned. Implementation Note this method is invoked by the default implementations of the
other Note Consider using
| |
| min | back to summary |
|---|---|
| public <E extends T> E min(E a, E b, E c, E... rest) Overrides com. Doc from com. Returns the least of the specified values according to this ordering. If there are multiple least values, the first of those is returned. Java 8 users: Use
| |
| min | back to summary |
|---|---|
| public <E extends T> E min(Iterator<E> iterator) Overrides com. Doc from com. Returns the least of the specified values according to this ordering. If there are multiple
least values, the first of those is returned. The iterator will be left exhausted: its Java 8 users: Use | |
| min | back to summary |
|---|---|
| public <E extends T> E min(Iterable<E> iterable) Overrides com. Doc from com. Returns the least of the specified values according to this ordering. If there are multiple least values, the first of those is returned. Java 8 users: If | |
| reverse | back to summary |
|---|---|
| public <S extends T> Ordering Overrides com. Doc from com. Returns the reverse of this ordering; the Java 8 users: Use
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |