S - The type of the left valueT - The type of the right valuepublic class ComparablePair<S extends Comparable<S>,T extends Comparable<T>> extends Pair<S,T> implements Comparable<ComparablePair<S,T>>
Comparable objects that are tied together.
Comparisons are done by first comparing the left object and only comparing
the right objects if the left objects are considered the same (i.e.
Comparable.compareTo(Object) returns 0).| Constructor and Description |
|---|
ComparablePair(S left,
T right)
Creates a new pair consisting of the two values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ComparablePair<S,T> pair) |
public int compareTo(ComparablePair<S,T> pair)
compareTo in interface Comparable<ComparablePair<S extends Comparable<S>,T extends Comparable<T>>>Comparable.compareTo(Object)Copyright © 2026. All rights reserved.