de.lmu.ifi.dbs.elki.utilities.pairs
Class FCPair<FIRST extends Comparable<? super FIRST>,SECOND>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.Pair<FIRST,SECOND>
      extended by 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.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair
first, second
 
Constructor Summary
FCPair(FIRST first, SECOND second)
          Initialize pair
 
Method Summary
 int compareTo(FCPair<FIRST,SECOND> other)
          Generic derived compare function.
static
<F extends Comparable<? super F>,S>
FCPair<F,S>[]
newArray(int size)
          Array constructor for generics
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair
equals, getFirst, getSecond, hashCode, newPairArray, setFirst, setSecond, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FCPair

public FCPair(FIRST first,
              SECOND second)
Initialize pair

Parameters:
first - first parameter
second - second parameter
Method Detail

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 type
S - Second type
Parameters:
size - Size of array to be constructed
Returns:
New array of requested size

Release 0.4.0 (2011-09-20_1324)