A - type of first valueB - type of second valueC - type of third valuepublic class Triple<A,B,C> extends DataObject
null.
It implements methods equals(), hashCode() and toString()
It's useful when if you would like to have a composite return value from a method or as a composite key to a map.
| Constructor and Description |
|---|
Triple(A a,
B b,
C c)
Constructor of
Triple with three values to wrap |
| Modifier and Type | Method and Description |
|---|---|
A |
a()
Returns first value
|
B |
b()
Returns second value
|
C |
c()
Returns third value
|
A |
getA()
Returns first value
|
B |
getB()
Returns second value
|
C |
getC()
Returns third value
|
<D> D |
map(TriFunction<? super A,? super B,? super C,? extends D> mapper)
Maps wrapped values using a provided
TriFunction |
static <A,B,C> Triple<A,B,C> |
triple(A a,
B b,
C c)
Factory method to create
Triple. |
equals, hashCode, toStringpublic static <A,B,C> Triple<A,B,C> triple(A a, B b, C c)
Triple.A - first value typeB - second value typeC - third value typea - first valueb - second valuec - third valueTriplepublic A getA()
public B getB()
public C getC()
public A a()
public B b()
public C c()
public <D> D map(TriFunction<? super A,? super B,? super C,? extends D> mapper)
TriFunctionD - the type of generated valuemapper - function to map wrapped values