de.lmu.ifi.dbs.elki.utilities.pairs
Class FCPair<FIRST extends Comparable<? super FIRST>,SECOND>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.pairs.Pair<FIRST,SECOND>
de.lmu.ifi.dbs.elki.utilities.pairs.FCPair<FIRST,SECOND>
- Type Parameters:
FIRST - first type (comparable)SECOND - second type
- All Implemented Interfaces:
- PairInterface<FIRST,SECOND>, Comparable<FCPair<FIRST,SECOND>>
- Direct Known Subclasses:
- AggarwalYuEvolutionary.Individuum
public class FCPair<FIRST extends Comparable<? super FIRST>,SECOND>
- extends Pair<FIRST,SECOND>
- implements Comparable<FCPair<FIRST,SECOND>>
Pair that can only be compared by it's first component.
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
first, second |
FCPair
public FCPair(FIRST first,
SECOND second)
- Initialize pair
- Parameters:
first - first parametersecond - second parameter
compareTo
public int compareTo(FCPair<FIRST,SECOND> other)
- Generic derived compare function.
- Specified by:
compareTo in interface Comparable<FCPair<FIRST extends Comparable<? super FIRST>,SECOND>>
- Parameters:
other - Object to compare to
- Returns:
- comparison result
newArray
public static final <F extends Comparable<? super F>,S> FCPair<F,S>[] newArray(int size)
- Array constructor for generics
- Type Parameters:
F - First typeS - Second type- Parameters:
size - Size of array to be constructed
- Returns:
- New array of requested size