Package reactor.util.function
Class Tuples
java.lang.Object
reactor.util.function.Tuples
- All Implemented Interfaces:
Function
A Tuples is an immutable
Collection of objects, each of which can be of an arbitrary type.- Author:
- Jon Brisbin, Stephane Maldini
-
Method Summary
Modifier and TypeMethodDescriptionfn2()A converting function from Object array toTuple2fn3()A converting function from Object array toTuple3A converting function from Object array toTuple3to R.fn4()A converting function from Object array toTuple4A converting function from Object array toTuple4to R.fn5()A converting function from Object array toTuple5A converting function from Object array toTuple4to R.fn6()A converting function from Object array toTuple6A converting function from Object array toTuple6to R.fn7()A converting function from Object array toTuple7A converting function from Object array toTuple7to R.fn8()A converting function from Object array toTuple8A converting function from Object array toTuple8fnAny()A converting function from Object array toTuplesA converting function from Object array toTuplesto R.static Tuple2static <T1,T2> Tuple2<T1, T2> of(T1 t1, T2 t2) Create aTuple2with the given objects.static <T1,T2, T3> Tuple3<T1, T2, T3> of(T1 t1, T2 t2, T3 t3) Create aTuple3with the given objects.static <T1,T2, T3, T4>
Tuple4<T1,T2, T3, T4> of(T1 t1, T2 t2, T3 t3, T4 t4) Create aTuple4with the given objects.static <T1,T2, T3, T4, T5>
Tuple5<T1,T2, T3, T4, T5> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) Create aTuple5with the given objects.static <T1,T2, T3, T4, T5, T6>
Tuple6<T1,T2, T3, T4, T5, T6> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) Create aTuple6with the given objects.static <T1,T2, T3, T4, T5, T6, T7>
Tuple7<T1,T2, T3, T4, T5, T6, T7> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) Create aTuple7with the given objects.static <T1,T2, T3, T4, T5, T6, T7, T8>
Tuple8<T1,T2, T3, T4, T5, T6, T7, T8> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) Create aTuple8with the given objects.
-
Method Details
-
fromArray
- Parameters:
list- the content of the Tuple (size 1 to 8)- Returns:
- The new
Tuple2. - Throws:
IllegalArgumentException- if the array is not of length 1-8
-
of
Create aTuple2with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.- Returns:
- The new
Tuple2.
-
of
Create aTuple3with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.t3- The third value in the tuple. Not null.- Returns:
- The new
Tuple3.
-
of
Create aTuple4with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.t3- The third value in the tuple. Not null.t4- The fourth value in the tuple. Not null.- Returns:
- The new
Tuple4.
-
of
Create aTuple5with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.t3- The third value in the tuple. Not null.t4- The fourth value in the tuple. Not null.t5- The fifth value in the tuple. Not null.- Returns:
- The new
Tuple5.
-
of
public static <T1,T2, Tuple6<T1,T3, T4, T5, T6> T2, ofT3, T4, T5, T6> (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) Create aTuple6with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.t3- The third value in the tuple. Not null.t4- The fourth value in the tuple. Not null.t5- The fifth value in the tuple. Not null.t6- The sixth value in the tuple. Not null.- Returns:
- The new
Tuple6.
-
of
public static <T1,T2, Tuple7<T1,T3, T4, T5, T6, T7> T2, ofT3, T4, T5, T6, T7> (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) Create aTuple7with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.- Parameters:
t1- The first value in the tuple. Not null.t2- The second value in the tuple. Not null.t3- The third value in the tuple. Not null.t4- The fourth value in the tuple. Not null.t5- The fifth value in the tuple. Not null.t6- The sixth value in the tuple. Not null.t7- The seventh value in the tuple. Not null.- Returns:
- The new
Tuple7.
-
of
public static <T1,T2, Tuple8<T1,T3, T4, T5, T6, T7, T8> T2, ofT3, T4, T5, T6, T7, T8> (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) Create aTuple8with the given objects.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.T8- The type of the eighth value.- Parameters:
t1- The first value in the tuple. Not Null.t2- The second value in the tuple.Not Null.t3- The third value in the tuple. Not Null.t4- The fourth value in the tuple. Not Null.t5- The fifth value in the tuple. Not Null.t6- The sixth value in the tuple. Not Null.t7- The seventh value in the tuple. Not Null.t8- The eighth value in the tuple. Not Null.- Returns:
- The new
Tuple8.
-
fnAny
A converting function from Object array toTuples- Returns:
- The unchecked conversion function to
Tuples.
-
fnAny
A converting function from Object array toTuplesto R.- Type Parameters:
R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn2
A converting function from Object array toTuple2- Type Parameters:
T1- The type of the first value.T2- The type of the second value.- Returns:
- The unchecked conversion function to
Tuple2.
-
fn3
A converting function from Object array toTuple3- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.- Returns:
- The unchecked conversion function to
Tuple3.
-
fn3
A converting function from Object array toTuple3to R.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn4
A converting function from Object array toTuple4- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.- Returns:
- The unchecked conversion function to
Tuple4.
-
fn4
public static <T1,T2, Function<Object[],T3, T4, R> R> fn4(Function<Tuple4<T1, T2, T3, T4>, R> delegate) A converting function from Object array toTuple4to R.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn5
A converting function from Object array toTuple5- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.- Returns:
- The unchecked conversion function to
Tuple5.
-
fn5
public static <T1,T2, Function<Object[],T3, T4, T5, R> R> fn5(Function<Tuple5<T1, T2, T3, T4, T5>, R> delegate) A converting function from Object array toTuple4to R.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn6
A converting function from Object array toTuple6- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.- Returns:
- The unchecked conversion function to
Tuple6.
-
fn6
public static <T1,T2, Function<Object[],T3, T4, T5, T6, R> R> fn6(Function<Tuple6<T1, T2, T3, T4, T5, T6>, R> delegate) A converting function from Object array toTuple6to R.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn7
A converting function from Object array toTuple7- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.- Returns:
- The unchecked conversion function to
Tuple7.
-
fn7
public static <T1,T2, Function<Object[],T3, T4, T5, T6, T7, R> R> fn7(Function<Tuple7<T1, T2, T3, T4, T5, T6, T7>, R> delegate) A converting function from Object array toTuple7to R.- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to R.
-
fn8
public static <T1,T2, Function<Object[],T3, T4, T5, T6, T7, T8> Tuple8<T1, fn8()T2, T3, T4, T5, T6, T7, T8>> A converting function from Object array toTuple8- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.T8- The type of the eighth value.- Returns:
- The unchecked conversion function to
Tuple8.
-
fn8
public static <T1,T2, Function<Object[],T3, T4, T5, T6, T7, T8, R> R> fn8(Function<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, R> delegate) A converting function from Object array toTuple8- Type Parameters:
T1- The type of the first value.T2- The type of the second value.T3- The type of the third value.T4- The type of the fourth value.T5- The type of the fifth value.T6- The type of the sixth value.T7- The type of the seventh value.T8- The type of the eighth value.R- The type of the return value.- Parameters:
delegate- the function to delegate to- Returns:
- The unchecked conversion function to
Tuple8.
-
apply
-