T1 - The type of the first valueT2 - The type of the second valuepublic interface Tuple<T1,T2> extends ViewableAsTuple<T1,T2>
ViewableAsTuple| Modifier and Type | Method and Description |
|---|---|
Tuple<T1,T2> |
asTuple() |
T1 |
first() |
<S1,S2> Tuple<S1,S2> |
map(Function<? super T1,? extends S1> firstMapper,
Function<? super T2,? extends S2> secondMapper)
Create a new tuple by applying a function to each element, and putting the
results to corresponding positions in the new tuple.
|
<S1> Tuple<S1,T2> |
mapFirst(Function<? super T1,? extends S1> mapper)
Create a new tuple by applying a function to the first element, and putting the
result as the first element of the new tuple.
|
<S2> Tuple<T1,S2> |
mapSecond(Function<? super T2,? extends S2> mapper)
Create a new tuple by applying a function to the second element, and putting the
result as the second element of the new tuple.
|
static <T1,T2> Tuple<T1,T2> |
of(T1 first,
T2 second) |
T2 |
second() |
default Tuple<T2,T1> |
swap() |
static <T1,T2> Tuple<T1,T2> of(T1 first, T2 second)
T1 first()
T2 second()
<S1> Tuple<S1,T2> mapFirst(Function<? super T1,? extends S1> mapper)
mapper - the function to apply to the first element<S2> Tuple<T1,S2> mapSecond(Function<? super T2,? extends S2> mapper)
mapper - the function to apply to the second element<S1,S2> Tuple<S1,S2> map(Function<? super T1,? extends S1> firstMapper, Function<? super T2,? extends S2> secondMapper)
firstMapper - the function to apply to the first elementsecondMapper - the function to apply to the second elementCopyright © 2018 Digipost. All rights reserved.