F - the class of the first objectS - the class of the second objectpublic class ComparablePair<F extends Comparable<? super F>,S extends Comparable<? super S>> extends Pair<F,S> implements Comparable<ComparablePair<F,S>>
Comparable.| Constructor and Description |
|---|
ComparablePair(F first,
S second)
Construct a
ComparablePair with the given values. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ComparablePair<F,S> o)
Compare this object with another for order.
|
static <F extends Comparable<? super F>,S extends Comparable<? super S>> |
create(F first,
S second)
Create a
ComparablePair, automatically deriving the classes of the objects. |
public int compareTo(ComparablePair<F,S> o)
ComparablePair, or if they are equal, on the order of the
second objects.compareTo in interface Comparable<ComparablePair<F extends Comparable<? super F>,S extends Comparable<? super S>>>o - the other objectComparable.compareTo(Object)public static <F extends Comparable<? super F>,S extends Comparable<? super S>> ComparablePair<F,S> create(F first, S second)
ComparablePair, automatically deriving the classes of the objects.F - Class of first objectS - Class of second objectfirst - the value for the first objectsecond - the value for the second objectComparablePairCopyright © 2020. All rights reserved.