| Modifier and Type | Field and Description |
|---|---|
| private Comparator | |
| private Comparator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Pair<S, T> o1, Pair<S, T> o2)
Implements java. Compares its two arguments for order. |
| public boolean | equals(Object obj)
Overrides java. Implements java. Indicates whether some other object is "equal to" this comparator. |
| public int | |
| public String |
| sc | back to summary |
|---|---|
| private Comparator<? super S> sc | |
| tc | back to summary |
|---|---|
| private Comparator<? super T> tc | |
| PairComparator | back to summary |
|---|---|
| public PairComparator(Comparator<? super S> sc, Comparator<? super T> tc) | |
| compare | back to summary |
|---|---|
| public int compare(Pair<S, T> o1, Pair<S, 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
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |