Package fi.jubic.easyutils.tuple
Class Tuple
- java.lang.Object
-
- fi.jubic.easyutils.tuple.Tuple
-
-
Constructor Summary
Constructors Constructor Description Tuple()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <T0,T1>
Tuple2<T0,T1>of(T0 t0, T1 t1)Create aTupleof 2 elements.static <T0,T1,T2>
Tuple3<T0,T1,T2>of(T0 t0, T1 t1, T2 t2)Create aTupleof 3 elements.static <T0,T1,T2,T3>
Tuple4<T0,T1,T2,T3>of(T0 t0, T1 t1, T2 t2, T3 t3)Create aTupleof 4 elements.static <T0,T1,T2,T3,T4>
Tuple5<T0,T1,T2,T3,T4>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)Create aTupleof 5 elements.static <T0,T1,T2,T3,T4,T5>
Tuple6<T0,T1,T2,T3,T4,T5>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)Create aTupleof 6 elements.static <T0,T1,T2,T3,T4,T5,T6>
Tuple7<T0,T1,T2,T3,T4,T5,T6>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)Create aTupleof 7 elements.static <T0,T1,T2,T3,T4,T5,T6,T7>
Tuple8<T0,T1,T2,T3,T4,T5,T6,T7>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)Create aTupleof 8 elements.static <T0,T1,T2,T3,T4,T5,T6,T7,T8>
Tuple9<T0,T1,T2,T3,T4,T5,T6,T7,T8>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)Create aTupleof 9 elements.static <T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>
Tuple10<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)Create aTupleof 10 elements.abstract List<Object>toList()Return elements of thisTuplewrapped in a simpleList.StringtoString()
-
-
-
Method Detail
-
toList
public abstract List<Object> toList()
Return elements of thisTuplewrapped in a simpleList.- Returns:
- the list of values
-
of
public static <T0,T1> Tuple2<T0,T1> of(T0 t0, T1 t1)
Create aTupleof 2 elements.- Type Parameters:
T0- the the type of the first valueT1- the the type of the second value- Parameters:
t0- the the first valuet1- the the second value- Returns:
- the created tuple
-
of
public static <T0,T1,T2> Tuple3<T0,T1,T2> of(T0 t0, T1 t1, T2 t2)
Create aTupleof 3 elements.- Type Parameters:
T0- the the type of the first valueT1- the the type of the second valueT2- the the type of the third value- Parameters:
t0- the the first valuet1- the the second valuet2- the the third value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3> Tuple4<T0,T1,T2,T3> of(T0 t0, T1 t1, T2 t2, T3 t3)
Create aTupleof 4 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4> Tuple5<T0,T1,T2,T3,T4> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)
Create aTupleof 5 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4,T5> Tuple6<T0,T1,T2,T3,T4,T5> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
Create aTupleof 6 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th valueT5- the type of the 6th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th valuet5- the 6th value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4,T5,T6> Tuple7<T0,T1,T2,T3,T4,T5,T6> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
Create aTupleof 7 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th valueT5- the type of the 6th valueT6- the type of the 7th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th valuet5- the 6th valuet6- the 7th value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4,T5,T6,T7> Tuple8<T0,T1,T2,T3,T4,T5,T6,T7> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
Create aTupleof 8 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th valueT5- the type of the 6th valueT6- the type of the 7th valueT7- the type of the 8th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th valuet5- the 6th valuet6- the 7th valuet7- the 8th value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4,T5,T6,T7,T8> Tuple9<T0,T1,T2,T3,T4,T5,T6,T7,T8> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
Create aTupleof 9 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th valueT5- the type of the 6th valueT6- the type of the 7th valueT7- the type of the 8th valueT8- the type of the 9th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th valuet5- the 6th valuet6- the 7th valuet7- the 8th valuet8- the 9th value- Returns:
- the created tuple
-
of
public static <T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> Tuple10<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> of(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
Create aTupleof 10 elements.- Type Parameters:
T0- the type of the first valueT1- the type of the second valueT2- the type of the third valueT3- the type of the fourth valueT4- the type of the 5th valueT5- the type of the 6th valueT6- the type of the 7th valueT7- the type of the 8th valueT8- the type of the 9th valueT9- the type of the 10th value- Parameters:
t0- the first valuet1- the second valuet2- the third valuet3- the fourth valuet4- the 5th valuet5- the 6th valuet6- the 7th valuet7- the 8th valuet8- the 9th valuet9- the 10th value- Returns:
- the created tuple
-
-