T
- the first generic comparable object type of the pairS
- the second generic comparable object type of the pairpublic class PairComparable<T extends Comparable<T>,S extends Comparable<S>> extends Pair<T,S> implements Comparable<PairComparable<T,S>>
Modifier and Type | Field and Description |
---|---|
private T |
first
the first object of this pair
|
private S |
second
the second object of this pair
|
Constructor and Description |
---|
PairComparable(T newFirst,
S newSecond)
the constructor requiring a parameter for both pairs (could be null)
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PairComparable<T,S> o) |
private T extends Comparable<T> first
private S extends Comparable<S> second
public int compareTo(PairComparable<T,S> o)
compareTo
in interface Comparable<PairComparable<T extends Comparable<T>,S extends Comparable<S>>>