T1 - Type for the first element of the tuple.T2 - Type for the second element of the tuple.T3 - Type for the third element of the tuple.public class Triplet<T1,T2,T3> extends Pair<T1,T2>
| Modifier | Constructor and Description |
|---|---|
protected |
Triplet(T1 first,
T2 second,
T3 third)
Constructs a 3-tuple.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
T3 |
getThird()
Gets the third element of the tuple.
|
int |
hashCode() |
void |
setThird(T3 third)
Sets the third element of the tuple.
|
String |
toString() |
static <TT1,TT2,TT3> |
valueOf(TT1 first,
TT2 second,
TT3 third)
Creates a new 3-tuple using the given values.
|
getFirst, setFirst, valueOfpublic static <TT1,TT2,TT3> Triplet<TT1,TT2,TT3> valueOf(TT1 first, TT2 second, TT3 third)
TT1 - the type for the first element of the tuple.TT2 - the type for the second element of the tuple.TT3 - the type for the third element of the tuple.first - First element in the tuple.second - Second element in the tuple.third - Third element in the tuple.public T3 getThird()
public void setThird(T3 third)
third - The third element.Copyright © 2014. All Rights Reserved.