Package no.digipost.tuple
Interface Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
-
- Type Parameters:
T1- The type of the first valueT2- The type of the second valueT3- The type of the third valueT4- The type of the fourth valueT5- The type of the fifth valueT6- The type of the sixth valueT7- The type of the seventh valueT8- The type of the eighth valueT9- The type of the ninth valueT10- The type of the tenth value
- All Superinterfaces:
ViewableAsDecuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
public interface Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> extends ViewableAsDecuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
A decuple is a simple composition of ten arbitrary values (objects). A decuple captures no semantics of the ten values, and they are only referred to as "the first", "the second", "the third", "the fourth", "the fifth", "the sixth", "the seventh", "the eighth", and "the ninth" value.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>asDecuple()T8eighth()T5fifth()T1first()static <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>flatten(Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<T1,T2>,T3>,T4>,T5>,T6>,T7>,T8>,T9>,T10> nestedTuple)T4fourth()<S1,S2,S3,S4,S5,S6,S7,S8,S9,S10>
Decuple<S1,S2,S3,S4,S5,S6,S7,S8,S9,S10>map(Function<? super T1,? extends S1> firstMapper, Function<? super T2,? extends S2> secondMapper, Function<? super T3,? extends S3> thirdMapper, Function<? super T4,? extends S4> fourthMapper, Function<? super T5,? extends S5> fifthMapper, Function<? super T6,? extends S6> sixthMapper, Function<? super T7,? extends S7> seventhMapper, Function<? super T8,? extends S8> eighthMapper, Function<? super T9,? extends S9> ninthMapper, Function<? super T10,? extends S10> tenthMapper)Create a new decuple by applying a function to each element, and putting the results into a new decuple.<S8> Decuple<T1,T2,T3,T4,T5,T6,T7,S8,T9,T10>mapEighth(Function<? super T8,? extends S8> mapper)Create a new decuple by applying a function to the eighth element, and putting the result as the eighth element of the new decuple.<S5> Decuple<T1,T2,T3,T4,S5,T6,T7,T8,T9,T10>mapFifth(Function<? super T5,? extends S5> mapper)Create a new decuple by applying a function to the fifth element, and putting the result as the fifth element of the new decuple.<S1> Decuple<S1,T2,T3,T4,T5,T6,T7,T8,T9,T10>mapFirst(Function<? super T1,? extends S1> mapper)Create a new decuple by applying a function to the first element, and putting the result as the first element of the new decuple.<S4> Decuple<T1,T2,T3,S4,T5,T6,T7,T8,T9,T10>mapFourth(Function<? super T4,? extends S4> mapper)Create a new decuple by applying a function to the fourth element, and putting the result as the fourth element of the new decuple.<S9> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,S9,T10>mapNinth(Function<? super T9,? extends S9> mapper)Create a new decuple by applying a function to the ninth element, and putting the result as the ninth element of the new decuple.<S2> Decuple<T1,S2,T3,T4,T5,T6,T7,T8,T9,T10>mapSecond(Function<? super T2,? extends S2> mapper)Create a new decuple by applying a function to the second element, and putting the result as the second element of the new decuple.<S7> Decuple<T1,T2,T3,T4,T5,T6,S7,T8,T9,T10>mapSeventh(Function<? super T7,? extends S7> mapper)Create a new decuple by applying a function to the seventh element, and putting the result as the seventh element of the new decuple.<S6> Decuple<T1,T2,T3,T4,T5,S6,T7,T8,T9,T10>mapSixth(Function<? super T6,? extends S6> mapper)Create a new decuple by applying a function to the sixth element, and putting the result as the sixth element of the new decuple.<S10> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,S10>mapTenth(Function<? super T10,? extends S10> mapper)Create a new decuple by applying a function to the tenth element, and putting the result as the tenth element of the new decuple.<S3> Decuple<T1,T2,S3,T4,T5,T6,T7,T8,T9,T10>mapThird(Function<? super T3,? extends S3> mapper)Create a new decuple by applying a function to the third element, and putting the result as the third element of the new decuple.T9ninth()static <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth, T9 ninth, T10 tenth)T2second()T7seventh()T6sixth()T10tenth()T3third()<R> Rto(DecaFunction<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? super T10,R> convertor)Convert this decuple to an instance of an arbitrary type.
-
-
-
Method Detail
-
of
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth, T9 ninth, T10 tenth)
-
flatten
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> flatten(Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<Tuple<T1,T2>,T3>,T4>,T5>,T6>,T7>,T8>,T9>,T10> nestedTuple)
-
first
T1 first()
- Returns:
- the first value
-
second
T2 second()
- Returns:
- the second value
-
third
T3 third()
- Returns:
- the third value
-
fourth
T4 fourth()
- Returns:
- the fourth value
-
fifth
T5 fifth()
- Returns:
- the fifth value
-
sixth
T6 sixth()
- Returns:
- the sixth value
-
seventh
T7 seventh()
- Returns:
- the seventh value
-
eighth
T8 eighth()
- Returns:
- the eighth value
-
ninth
T9 ninth()
- Returns:
- the ninth value
-
tenth
T10 tenth()
- Returns:
- the tenth value
-
mapFirst
<S1> Decuple<S1,T2,T3,T4,T5,T6,T7,T8,T9,T10> mapFirst(Function<? super T1,? extends S1> mapper)
Create a new decuple by applying a function to the first element, and putting the result as the first element of the new decuple.- Parameters:
mapper- the function to apply to the first element- Returns:
- the new decuple
-
mapSecond
<S2> Decuple<T1,S2,T3,T4,T5,T6,T7,T8,T9,T10> mapSecond(Function<? super T2,? extends S2> mapper)
Create a new decuple by applying a function to the second element, and putting the result as the second element of the new decuple.- Parameters:
mapper- the function to apply to the second element- Returns:
- the new decuple
-
mapThird
<S3> Decuple<T1,T2,S3,T4,T5,T6,T7,T8,T9,T10> mapThird(Function<? super T3,? extends S3> mapper)
Create a new decuple by applying a function to the third element, and putting the result as the third element of the new decuple.- Parameters:
mapper- the function to apply to the third element- Returns:
- the new decuple
-
mapFourth
<S4> Decuple<T1,T2,T3,S4,T5,T6,T7,T8,T9,T10> mapFourth(Function<? super T4,? extends S4> mapper)
Create a new decuple by applying a function to the fourth element, and putting the result as the fourth element of the new decuple.- Parameters:
mapper- the function to apply to the fourth element- Returns:
- the new decuple
-
mapFifth
<S5> Decuple<T1,T2,T3,T4,S5,T6,T7,T8,T9,T10> mapFifth(Function<? super T5,? extends S5> mapper)
Create a new decuple by applying a function to the fifth element, and putting the result as the fifth element of the new decuple.- Parameters:
mapper- the function to apply to the fifth element- Returns:
- the new decuple
-
mapSixth
<S6> Decuple<T1,T2,T3,T4,T5,S6,T7,T8,T9,T10> mapSixth(Function<? super T6,? extends S6> mapper)
Create a new decuple by applying a function to the sixth element, and putting the result as the sixth element of the new decuple.- Parameters:
mapper- the function to apply to the sixth element- Returns:
- the new decuple
-
mapSeventh
<S7> Decuple<T1,T2,T3,T4,T5,T6,S7,T8,T9,T10> mapSeventh(Function<? super T7,? extends S7> mapper)
Create a new decuple by applying a function to the seventh element, and putting the result as the seventh element of the new decuple.- Parameters:
mapper- the function to apply to the seventh element- Returns:
- the new decuple
-
mapEighth
<S8> Decuple<T1,T2,T3,T4,T5,T6,T7,S8,T9,T10> mapEighth(Function<? super T8,? extends S8> mapper)
Create a new decuple by applying a function to the eighth element, and putting the result as the eighth element of the new decuple.- Parameters:
mapper- the function to apply to the eighth element- Returns:
- the new decuple
-
mapNinth
<S9> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,S9,T10> mapNinth(Function<? super T9,? extends S9> mapper)
Create a new decuple by applying a function to the ninth element, and putting the result as the ninth element of the new decuple.- Parameters:
mapper- the function to apply to the ninth element- Returns:
- the new decuple
-
mapTenth
<S10> Decuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,S10> mapTenth(Function<? super T10,? extends S10> mapper)
Create a new decuple by applying a function to the tenth element, and putting the result as the tenth element of the new decuple.- Parameters:
mapper- the function to apply to the tenth element- Returns:
- the new decuple
-
map
<S1,S2,S3,S4,S5,S6,S7,S8,S9,S10> Decuple<S1,S2,S3,S4,S5,S6,S7,S8,S9,S10> map(Function<? super T1,? extends S1> firstMapper, Function<? super T2,? extends S2> secondMapper, Function<? super T3,? extends S3> thirdMapper, Function<? super T4,? extends S4> fourthMapper, Function<? super T5,? extends S5> fifthMapper, Function<? super T6,? extends S6> sixthMapper, Function<? super T7,? extends S7> seventhMapper, Function<? super T8,? extends S8> eighthMapper, Function<? super T9,? extends S9> ninthMapper, Function<? super T10,? extends S10> tenthMapper)
Create a new decuple by applying a function to each element, and putting the results into a new decuple.- Parameters:
firstMapper- the function to apply to the first elementsecondMapper- the function to apply to the second elementthirdMapper- the function to apply to the third elementfourthMapper- the function to apply to the fourth elementfifthMapper- the function to apply to the fifth elementsixthMapper- the function to apply to the sixth elementseventhMapper- the function to apply to the seventh elementeighthMapper- the function to apply to the eighth elementninthMapper- the function to apply to the ninth elementtenthMapper- the function to apply to the tenth element- Returns:
- the new decuple
-
to
<R> R to(DecaFunction<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? super T10,R> convertor)
Convert this decuple to an instance of an arbitrary type.- Type Parameters:
R- The type of the resulting instance- Parameters:
convertor- the function used to convert the contained values to a resulting compound instance.- Returns:
- the result from the given function
-
-