de.lmu.ifi.dbs.elki.utilities.pairs
Class CTriple<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>,THIRD extends Comparable<THIRD>>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.pairs.Triple<FIRST,SECOND,THIRD>
de.lmu.ifi.dbs.elki.utilities.pairs.CTriple<FIRST,SECOND,THIRD>
- Type Parameters:
FIRST - first typeSECOND - second typeTHIRD - 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.
CTriple
public CTriple(FIRST first,
SECOND second,
THIRD third)
- Constructor with fields
- Parameters:
first - Value of first componentsecond - Value of second componentthird - Value of third component
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 typeS - Second typeT - Third type- Parameters:
size - Size of array to be constructed.
- Returns:
- New array of requested size