|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.tuple.Tuple
edu.rice.cs.plt.tuple.Triple<T1,T2,T3>
public class Triple<T1,T2,T3>
An arbitrary 3-tuple of objects; overrides toString(), equals(Object),
and Tuple.hashCode().
| Field Summary | |
|---|---|
protected T1 |
_first
|
protected T2 |
_second
|
protected T3 |
_third
|
| Constructor Summary | |
|---|---|
Triple(T1 first,
T2 second,
T3 third)
|
|
| Method Summary | ||
|---|---|---|
static
|
comparator()
Produce a comparator for triples, ordered by the natural order of the elements (the leftmost elements have the highest sort priority). |
|
static
|
comparator(Comparator<? super T1> comp1,
Comparator<? super T2> comp2,
Comparator<? super T3> comp3)
Produce a comparator for triples, ordered by the given comparators (the leftmost elements have the highest sort priority). |
|
boolean |
equals(Object o)
|
|
static
|
factory()
Produce a lambda that invokes the constructor |
|
T1 |
first()
|
|
static
|
firstGetter()
Produce a lambda that invokes first() on a provided triple. |
|
protected int |
generateHashCode()
|
|
static
|
make(T1 first,
T2 second,
T3 third)
Call the constructor (allows the type arguments to be inferred) |
|
T2 |
second()
|
|
static
|
secondGetter()
Produce a lambda that invokes second() on a provided triple. |
|
T3 |
third()
|
|
static
|
thirdGetter()
Produce a lambda that invokes third() on a provided triple. |
|
String |
toString()
|
|
| Methods inherited from class edu.rice.cs.plt.tuple.Tuple |
|---|
hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final T1 _first
protected final T2 _second
protected final T3 _third
| Constructor Detail |
|---|
public Triple(T1 first,
T2 second,
T3 third)
| Method Detail |
|---|
public T1 first()
public T2 second()
public T3 third()
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objecttrue iff this is of the same class as o, and each
corresponding element is equal (according to equals)protected int generateHashCode()
generateHashCode in class Tuple
public static <T1,T2,T3> Triple<T1,T2,T3> make(T1 first,
T2 second,
T3 third)
public static <T1,T2,T3> Lambda3<T1,T2,T3,Triple<T1,T2,T3>> factory()
public static <T> Lambda<Triple<? extends T,?,?>,T> firstGetter()
first() on a provided triple.
public static <T> Lambda<Triple<?,? extends T,?>,T> secondGetter()
second() on a provided triple.
public static <T> Lambda<Triple<?,?,? extends T>,T> thirdGetter()
third() on a provided triple.
public static <T1 extends Comparable<? super T1>,T2 extends Comparable<? super T2>,T3 extends Comparable<? super T3>> TotalOrder<Triple<? extends T1,? extends T2,? extends T3>> comparator()
public static <T1,T2,T3> TotalOrder<Triple<? extends T1,? extends T2,? extends T3>> comparator(Comparator<? super T1> comp1,
Comparator<? super T2> comp2,
Comparator<? super T3> comp3)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||