Package net.fauxpark.tuples
Class Tuples
- java.lang.Object
-
- net.fauxpark.tuples.Tuples
-
public abstract class Tuples extends Object
Makes tuples for your pleasure.- Author:
- fauxpark
-
-
Constructor Summary
Constructors Constructor Description Tuples()
-
Method Summary
Modifier and Type Method Description static <A> OneTuple<A>
create(A a)
Makes a 1-tuple.static <A,B>
TwoTuple<A,B>create(A a, B b)
Makes a 2-tuple.static <A,B,C>
ThreeTuple<A,B,C>create(A a, B b, C c)
Makes a 3-tuple.static <A,B,C,D>
FourTuple<A,B,C,D>create(A a, B b, C c, D d)
Makes a 4-tuple.static <A,B,C,D,E>
FiveTuple<A,B,C,D,E>create(A a, B b, C c, D d, E e)
Makes a 5-tuple.static <A,B,C,D,E,F>
SixTuple<A,B,C,D,E,F>create(A a, B b, C c, D d, E e, F f)
Makes a 6-tuple.static <A,B,C,D,E,F,G>
SevenTuple<A,B,C,D,E,F,G>create(A a, B b, C c, D d, E e, F f, G g)
Makes a 7-tuple.static <A,B,C,D,E,F,G,H>
EightTuple<A,B,C,D,E,F,G,H>create(A a, B b, C c, D d, E e, F f, G g, H h)
Makes an 8-tuple.
-
-
-
Method Detail
-
create
public static <A> OneTuple<A> create(A a)
Makes a 1-tuple.- Type Parameters:
A
- The first type.- Parameters:
a
- The first value.- Returns:
- A 1-tuple of the given object.
-
create
public static <A,B> TwoTuple<A,B> create(A a, B b)
Makes a 2-tuple.- Type Parameters:
A
- The first type.B
- The second type.- Parameters:
a
- The first value.b
- The second value.- Returns:
- A 2-tuple of the given two objects.
-
create
public static <A,B,C> ThreeTuple<A,B,C> create(A a, B b, C c)
Makes a 3-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.- Returns:
- A 3-tuple of the given three objects.
-
create
public static <A,B,C,D> FourTuple<A,B,C,D> create(A a, B b, C c, D d)
Makes a 4-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.D
- The fourth type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.d
- The fourth value.- Returns:
- A 4-tuple of the given four objects.
-
create
public static <A,B,C,D,E> FiveTuple<A,B,C,D,E> create(A a, B b, C c, D d, E e)
Makes a 5-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.D
- The fourth type.E
- The fifth type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.d
- The fourth value.e
- The fifth value.- Returns:
- A 5-tuple of the given five objects.
-
create
public static <A,B,C,D,E,F> SixTuple<A,B,C,D,E,F> create(A a, B b, C c, D d, E e, F f)
Makes a 6-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.D
- The fourth type.E
- The fifth type.F
- The sixth type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.d
- The fourth value.e
- The fifth value.f
- The sixth value.- Returns:
- A 6-tuple of the given six objects.
-
create
public static <A,B,C,D,E,F,G> SevenTuple<A,B,C,D,E,F,G> create(A a, B b, C c, D d, E e, F f, G g)
Makes a 7-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.D
- The fourth type.E
- The fifth type.F
- The sixth type.G
- The seventh type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.d
- The fourth value.e
- The fifth value.f
- The sixth value.g
- The seventh value.- Returns:
- A 7-tuple of the given seven objects.
-
create
public static <A,B,C,D,E,F,G,H> EightTuple<A,B,C,D,E,F,G,H> create(A a, B b, C c, D d, E e, F f, G g, H h)
Makes an 8-tuple.- Type Parameters:
A
- The first type.B
- The second type.C
- The third type.D
- The fourth type.E
- The fifth type.F
- The sixth type.G
- The seventh type.H
- The eighth type.- Parameters:
a
- The first value.b
- The second value.c
- The third value.d
- The fourth value.e
- The fifth value.f
- The sixth value.g
- The seventh value.h
- The eighth value.- Returns:
- An 8-tuple of the given eight objects.
-
-