de.lmu.ifi.dbs.elki.utilities.pairs
Class CTriple<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>,THIRD extends Comparable<THIRD>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.Triple<FIRST,SECOND,THIRD>
      extended by de.lmu.ifi.dbs.elki.utilities.pairs.CTriple<FIRST,SECOND,THIRD>
Type Parameters:
FIRST - first type
SECOND - second type
THIRD - second type
All Implemented Interfaces:
Comparable<CTriple<FIRST,SECOND,THIRD>>

public final class CTriple<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>,THIRD extends Comparable<THIRD>>
extends Triple<FIRST,SECOND,THIRD>
implements Comparable<CTriple<FIRST,SECOND,THIRD>>

Triple with canonical comparison function.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Triple
first, second, third
 
Constructor Summary
CTriple(FIRST first, SECOND second, THIRD third)
          Constructor with fields
 
Method Summary
 int compareTo(CTriple<FIRST,SECOND,THIRD> other)
          Generic derived compare function.
static
<F extends Comparable<F>,S extends Comparable<S>,T extends Comparable<T>>
CTriple<F,S,T>[]
newArray(int size)
          Array constructor for generics
 String toString()
          Canonical toString operator
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Triple
equals, getFirst, getSecond, getThird, hashCode, setFirst, setSecond, setThird
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CTriple

public CTriple(FIRST first,
               SECOND second,
               THIRD third)
Constructor with fields

Parameters:
first - Value of first component
second - Value of second component
third - Value of third component
Method Detail

toString

public String toString()
Canonical toString operator

Overrides:
toString in class Triple<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>,THIRD extends Comparable<THIRD>>

compareTo

public int compareTo(CTriple<FIRST,SECOND,THIRD> other)
Generic derived compare function.

Specified by:
compareTo in interface Comparable<CTriple<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>,THIRD extends Comparable<THIRD>>>
Parameters:
other - Object to compare to
Returns:
comparison result

newArray

public static final <F extends Comparable<F>,S extends Comparable<S>,T extends Comparable<T>> CTriple<F,S,T>[] newArray(int size)
Array constructor for generics

Type Parameters:
F - First type
S - Second type
T - Third type
Parameters:
size - Size of array to be constructed.
Returns:
New array of requested size

Release 0.4.0 (2011-09-20_1324)