Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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:
Comparable<FCPair<FIRST,SECOND>>

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.

Author:
Erich Schubert

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.3 (2010-03-31_1612)