Located in compilation unit of io.
| Modifier and Type | Field and Description |
|---|---|
| private static final NaturalComparator | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| 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. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Implements java. Indicates whether some other object is "equal to" this comparator. |
| public int | |
| pack-priv static <T> NaturalComparator | |
| private Object | Returns: The singleton instance of NaturalComparator.Instance control for object serialization. |
| INSTANCE | back to summary |
|---|---|
| private static final NaturalComparator<?> INSTANCE | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| NaturalComparator | back to summary |
|---|---|
| private NaturalComparator() | |
| 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
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) 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 this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| instance | back to summary |
|---|---|
pack-priv static <T> NaturalComparator
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Instance control for object serialization.
| |