public final class Tuple
extends java.lang.Object
of(...)
and ofNullable(...)
tuple creation methods which are a bit
more wordy versions of the T(...)
and N(...)
methods of Tuples
.
So both
Tuple.of(a, b) // from this class
T(a, b), // requires import static Tuples.T;
will return equal 2-tuples.Modifier and Type | Method and Description |
---|---|
static <T1,T2> Tuple2<T1,T2> |
of(T1 value1,
T2 value2)
Create a tuple with two non-null values.
|
static <T1,T2,T3> Tuple3<T1,T2,T3> |
of(T1 value1,
T2 value2,
T3 value3)
Create a tuple with 3 non-null values.
|
static <T1,T2,T3,T4> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4)
Create a tuple with 4 non-null values.
|
static <T1,T2,T3,T4,T5> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5)
Create a tuple with 5 non-null values.
|
static <T1,T2,T3,T4,T5,T6> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6)
Create a tuple with 6 non-null values.
|
static <T1,T2,T3,T4,T5,T6,T7> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7)
Create a tuple with 7 non-null values.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7,
T8 value8)
Create a tuple with 8 non-null values.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
of(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7,
T8 value8,
T9 value9)
Create a tuple with 9 non-null values.
|
static <T1,T2> NTuple2<T1,T2> |
ofNullable(T1 value1,
T2 value2)
Create a tuple with two values which can possibly be null.
|
static <T1,T2,T3> NTuple3<T1,T2,T3> |
ofNullable(T1 value1,
T2 value2,
T3 value3)
Create a tuple with 3 values which can possibly be null.
|
static <T1,T2,T3,T4> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4)
Create a tuple with 4 values which can possibly be null.
|
static <T1,T2,T3,T4,T5> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5)
Create a tuple with 5 values which can possibly be null.
|
static <T1,T2,T3,T4,T5,T6> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6)
Create a tuple with 6 values which can possibly be null.
|
static <T1,T2,T3,T4,T5,T6,T7> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7)
Create a tuple with 7 values which can possibly be null.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7,
T8 value8)
Create a tuple with 8 values which can possibly be null.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
ofNullable(T1 value1,
T2 value2,
T3 value3,
T4 value4,
T5 value5,
T6 value6,
T7 value7,
T8 value8,
T9 value9)
Create a tuple with 9 values which can possibly be null.
|
@NotNull public static <T1,T2> Tuple2<T1,T2> of(@NotNull T1 value1, @NotNull T2 value2)
T1
- type of first valueT2
- type of second valuevalue1
- first valuevalue2
- second value@NotNull public static <T1,T2> NTuple2<T1,T2> ofNullable(@Nullable T1 value1, @Nullable T2 value2)
T1
- type of first valueT2
- type of second valuevalue1
- first valuevalue2
- second value@NotNull public static <T1,T2,T3> Tuple3<T1,T2,T3> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3)
T1
- type of first valueT2
- type of second valueT3
- type of third valuevalue1
- first valuevalue2
- second valuevalue3
- third value@NotNull public static <T1,T2,T3> NTuple3<T1,T2,T3> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3)
T1
- type of first valueT2
- type of second valueT3
- type of third valuevalue1
- first valuevalue2
- second valuevalue3
- third value@NotNull public static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth value@NotNull public static <T1,T2,T3,T4> NTuple4<T1,T2,T3,T4> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth value@NotNull public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4, @NotNull T5 value5)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth value@NotNull public static <T1,T2,T3,T4,T5> NTuple5<T1,T2,T3,T4,T5> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4, @Nullable T5 value5)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth value@NotNull public static <T1,T2,T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4, @NotNull T5 value5, @NotNull T6 value6)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth value@NotNull public static <T1,T2,T3,T4,T5,T6> NTuple6<T1,T2,T3,T4,T5,T6> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4, @Nullable T5 value5, @Nullable T6 value6)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth value@NotNull public static <T1,T2,T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4, @NotNull T5 value5, @NotNull T6 value6, @NotNull T7 value7)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh value@NotNull public static <T1,T2,T3,T4,T5,T6,T7> NTuple7<T1,T2,T3,T4,T5,T6,T7> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4, @Nullable T5 value5, @Nullable T6 value6, @Nullable T7 value7)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh value@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4, @NotNull T5 value5, @NotNull T6 value6, @NotNull T7 value7, @NotNull T8 value8)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valueT8
- type of eighth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh valuevalue8
- eighth value@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> NTuple8<T1,T2,T3,T4,T5,T6,T7,T8> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4, @Nullable T5 value5, @Nullable T6 value6, @Nullable T7 value7, @Nullable T8 value8)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valueT8
- type of eighth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh valuevalue8
- eighth value@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> of(@NotNull T1 value1, @NotNull T2 value2, @NotNull T3 value3, @NotNull T4 value4, @NotNull T5 value5, @NotNull T6 value6, @NotNull T7 value7, @NotNull T8 value8, @NotNull T9 value9)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valueT8
- type of eighth valueT9
- type of nineth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh valuevalue8
- eighth valuevalue9
- nineth value@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> NTuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> ofNullable(@Nullable T1 value1, @Nullable T2 value2, @Nullable T3 value3, @Nullable T4 value4, @Nullable T5 value5, @Nullable T6 value6, @Nullable T7 value7, @Nullable T8 value8, @Nullable T9 value9)
T1
- type of first valueT2
- type of second valueT3
- type of third valueT4
- type of fourth valueT5
- type of fifth valueT6
- type of sixth valueT7
- type of seventh valueT8
- type of eighth valueT9
- type of nineth valuevalue1
- first valuevalue2
- second valuevalue3
- third valuevalue4
- fourth valuevalue5
- fifth valuevalue6
- sixth valuevalue7
- seventh valuevalue8
- eighth valuevalue9
- nineth value