
FIRST - first type (comparable)SECOND - second typepublic class SCPair<FIRST,SECOND extends Comparable<? super SECOND>> extends Pair<FIRST,SECOND> implements Comparable<SCPair<FIRST,SECOND>>
| Constructor and Description |
|---|
SCPair(FIRST first,
SECOND second)
Initialize pair
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SCPair<FIRST,SECOND> other)
Generic derived compare function.
|
static <F,S extends Comparable<? super S>> |
newArray(int size)
Array constructor for generics
|
public int compareTo(SCPair<FIRST,SECOND> other)
compareTo in interface Comparable<SCPair<FIRST,SECOND extends Comparable<? super SECOND>>>other - Object to compare topublic static final <F,S extends Comparable<? super S>> SCPair<F,S>[] newArray(int size)
F - First typeS - Second typesize - Size of array to be constructed