public final class Tuples
extends java.lang.Object
The tuple factory methods T(...)
(create tuple with non-null elements)
and N(...)
(create tuple with nullable elements) are best imported statically.
This allows short on-the-fly tuple creation like
return T(a, b, c); // returns a 3-tuple (a, b, c)
instead of more gabby constructor calls.
Furthermore, there are cast()
methods which address the problem that Java is
overly picky with tuple types because it does not understand that tuples use their types
read-only.
Assume you have two tuples and want to add then to a more generic collection:
Tuple2<Rectangle2D, Color> coloredRect = T(new Rectangle(), Color.red);
Tuple2<Ellipse2D, Color> coloredCircle = T(new Ellipse2D.Double(), Color.green);
Collection<Tuple2<Shape, Color>> coloredShapes = new LinkedList<>();
coloredShapes.add(coloredRect); // error: incompatible types: de.caff.generics.tuple.Tuple2<java.awt.geom.Rectangle2D,java.awt.Color> cannot be converted to de.caff.generics.tuple.Tuple2<java.awt.Shape,java.awt.Color>
coloredShapes.add(coloredCircle); // error: incompatible types: de.caff.generics.tuple.Tuple2<java.awt.geom.Ellipse2D,java.awt.Color> cannot be converted to de.caff.generics.tuple.Tuple2<java.awt.Shape,java.awt.Color>
Although both Rectangle
and Ellipse2D
implement Shape
compiling the above will result
in the two compiler errors mentioned in the comments.
The reason is that the compiler cannot know that it is not possible to set something in a tuple (indeed
it could know right now, but cannot know what changes might happen in the future).
If it would accept the code for a mutable tuple, somebody could take the coloredShapes
, extract the
collection's first tuple, and set its first element to a circle. But the first tuple is the same as
coloredRect
, which is convinced that its first element is a rectangle. Ouch!
So there is a good reason for Java to be careful, but in this case it is not necessary,
as the tuples here are deliberately designed immutable.
So to circumvent the problem use the following code instead of the last 2 lines of above example
which will make it compile without even a warning (assumes static import of cast
):
coloredShapes.add(cast(coloredRect));
coloredShapes.add(cast(coloredCircle));
All cast()
methods in this class will just directly return their tuple argument as is.
The JIT should even be able to remove these calls,
Modifier and Type | Method and Description |
---|---|
static <T1,T2> ITuple2<T1,T2> |
downCast(ITuple2<? extends T1,? extends T2> tuple)
Allow to view a 2-tuple as one with different more basic element types.
|
static <T1,T2,T3> ITuple3<T1,T2,T3> |
downCast(ITuple3<? extends T1,? extends T2,? extends T3> tuple)
Allow to view a 3-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4> |
downCast(ITuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
Allow to view a 4-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5> |
downCast(ITuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
Allow to view a 5-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6> |
downCast(ITuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
Allow to view a 6-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7> |
downCast(ITuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
Allow to view a 7-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
downCast(ITuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
Allow to view an 8-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
downCast(ITuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
Allow to view a 9-tuple as one with different more basic element types.
|
static <T1,T2> NTuple2<T1,T2> |
downCast(NTuple2<? extends T1,? extends T2> tuple)
Allow to view a 2-tuple as one with different more basic element types.
|
static <T1,T2,T3> NTuple3<T1,T2,T3> |
downCast(NTuple3<? extends T1,? extends T2,? extends T3> tuple)
Allow to view a 3-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4> |
downCast(NTuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
Allow to view a 4-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5> |
downCast(NTuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
Allow to view a 5-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6> |
downCast(NTuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
Allow to view a 6-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7> |
downCast(NTuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
Allow to view a 7-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
downCast(NTuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
Allow to view an 8-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
downCast(NTuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
Allow to view a 9-tuple as one with different more basic element types.
|
static <T1,T2> Tuple2<T1,T2> |
downCast(Tuple2<? extends T1,? extends T2> tuple)
Allow to view a 2-tuple as one with different more basic element types.
|
static <T1,T2,T3> Tuple3<T1,T2,T3> |
downCast(Tuple3<? extends T1,? extends T2,? extends T3> tuple)
Allow to view a 3-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4> |
downCast(Tuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
Allow to view a 4-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5> |
downCast(Tuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
Allow to view a 5-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6> |
downCast(Tuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
Allow to view a 6-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7> |
downCast(Tuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
Allow to view a 7-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
downCast(Tuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
Allow to view an 8-tuple as one with different more basic element types.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
downCast(Tuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
Allow to view a 9-tuple as one with different more basic element types.
|
static <T1,T2> NTuple2<T1,T2> |
N(T1 e1,
T2 e2)
Create a 2-tuple with nullable elements.
|
static <T1,T2,T3> NTuple3<T1,T2,T3> |
N(T1 e1,
T2 e2,
T3 e3)
Create a 3-tuple with nullable elements.
|
static <T1,T2,T3,T4> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4)
Create a 4-tuple with nullable elements.
|
static <T1,T2,T3,T4,T5> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5)
Create a 5-tuple with nullable elements.
|
static <T1,T2,T3,T4,T5,T6> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6)
Create a 6-tuple with nullable elements.
|
static <T1,T2,T3,T4,T5,T6,T7> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7)
Create a 7-tuple with nullable elements.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7,
T8 e8)
Create an 8-tuple with nullable elements.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
N(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7,
T8 e8,
T9 e9)
Create a 9-tuple with nullable elements.
|
static <T1,T2> Tuple2<T1,T2> |
T(T1 e1,
T2 e2)
Create a 2-tuple with non-null elements.
|
static <T1,T2,T3> Tuple3<T1,T2,T3> |
T(T1 e1,
T2 e2,
T3 e3)
Create a 3-tuple with non-null elements.
|
static <T1,T2,T3,T4> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4)
Create a 4-tuple with non-null elements.
|
static <T1,T2,T3,T4,T5> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5)
Create a 5-tuple with non-null elements.
|
static <T1,T2,T3,T4,T5,T6> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6)
Create a 6-tuple with non-null elements.
|
static <T1,T2,T3,T4,T5,T6,T7> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7)
Create a 7-tuple with non-null elements.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7,
T8 e8)
Create an 8-tuple with non-null elements.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
T(T1 e1,
T2 e2,
T3 e3,
T4 e4,
T5 e5,
T6 e6,
T7 e7,
T8 e8,
T9 e9)
Create a 9-tuple with non-null elements.
|
@NotNull public static <T1,T2> Tuple2<T1,T2> T(@NotNull T1 e1, @NotNull T2 e2)
T1
- first element typeT2
- second element typee1
- first tuple elemente2
- second tuple element@NotNull public static <T1,T2,T3> Tuple3<T1,T2,T3> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3)
T1
- first element typeT2
- second element typeT3
- third element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple element@NotNull public static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple element@NotNull public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4, @NotNull T5 e5)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4, @NotNull T5 e5, @NotNull T6 e6)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4, @NotNull T5 e5, @NotNull T6 e6, @NotNull T7 e7)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4, @NotNull T5 e5, @NotNull T6 e6, @NotNull T7 e7, @NotNull T8 e8)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typeT8
- eighth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple elemente8
- eighth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> T(@NotNull T1 e1, @NotNull T2 e2, @NotNull T3 e3, @NotNull T4 e4, @NotNull T5 e5, @NotNull T6 e6, @NotNull T7 e7, @NotNull T8 e8, @NotNull T9 e9)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typeT8
- eighth element typeT9
- ninth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple elemente8
- eighth tuple elemente9
- ninth tuple element@NotNull public static <T1,T2> NTuple2<T1,T2> N(@Nullable T1 e1, @Nullable T2 e2)
T1
- first element typeT2
- second element typee1
- first tuple elemente2
- second tuple element@NotNull public static <T1,T2,T3> NTuple3<T1,T2,T3> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3)
T1
- first element typeT2
- second element typeT3
- third element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple element@NotNull public static <T1,T2,T3,T4> NTuple4<T1,T2,T3,T4> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple element@NotNull public static <T1,T2,T3,T4,T5> NTuple5<T1,T2,T3,T4,T5> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4, @Nullable T5 e5)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6> NTuple6<T1,T2,T3,T4,T5,T6> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4, @Nullable T5 e5, @Nullable T6 e6)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7> NTuple7<T1,T2,T3,T4,T5,T6,T7> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4, @Nullable T5 e5, @Nullable T6 e6, @Nullable T7 e7)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> NTuple8<T1,T2,T3,T4,T5,T6,T7,T8> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4, @Nullable T5 e5, @Nullable T6 e6, @Nullable T7 e7, @Nullable T8 e8)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typeT8
- eighth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple elemente8
- eighth tuple element@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> NTuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> N(@Nullable T1 e1, @Nullable T2 e2, @Nullable T3 e3, @Nullable T4 e4, @Nullable T5 e5, @Nullable T6 e6, @Nullable T7 e7, @Nullable T8 e8, @Nullable T9 e9)
T1
- first element typeT2
- second element typeT3
- third element typeT4
- fourth element typeT5
- fifth element typeT6
- sixth element typeT7
- seventh element typeT8
- eighth element typeT9
- ninth element typee1
- first tuple elemente2
- second tuple elemente3
- third tuple elemente4
- fourth tuple elemente5
- fifth tuple elemente6
- sixth tuple elemente7
- seventh tuple elemente8
- eighth tuple elemente9
- ninth tuple element@NotNull public static <T1,T2> Tuple2<T1,T2> downCast(@NotNull Tuple2<? extends T1,? extends T2> tuple)
T1
- required first element typeT2
- required last element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3> Tuple3<T1,T2,T3> downCast(@NotNull Tuple3<? extends T1,? extends T2,? extends T3> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> downCast(@NotNull Tuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> downCast(@NotNull Tuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> downCast(@NotNull Tuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> downCast(@NotNull Tuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> downCast(@NotNull Tuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> downCast(@NotNull Tuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typeT9
- required ninth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2> NTuple2<T1,T2> downCast(@NotNull NTuple2<? extends T1,? extends T2> tuple)
T1
- required first element typeT2
- required last element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3> NTuple3<T1,T2,T3> downCast(@NotNull NTuple3<? extends T1,? extends T2,? extends T3> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4> NTuple4<T1,T2,T3,T4> downCast(@NotNull NTuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5> NTuple5<T1,T2,T3,T4,T5> downCast(@NotNull NTuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6> NTuple6<T1,T2,T3,T4,T5,T6> downCast(@NotNull NTuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7> NTuple7<T1,T2,T3,T4,T5,T6,T7> downCast(@NotNull NTuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> NTuple8<T1,T2,T3,T4,T5,T6,T7,T8> downCast(@NotNull NTuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> NTuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> downCast(@NotNull NTuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typeT9
- required ninth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2> ITuple2<T1,T2> downCast(@NotNull ITuple2<? extends T1,? extends T2> tuple)
T1
- required first element typeT2
- required last element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3> ITuple3<T1,T2,T3> downCast(@NotNull ITuple3<? extends T1,? extends T2,? extends T3> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4> ITuple4<T1,T2,T3,T4> downCast(@NotNull ITuple4<? extends T1,? extends T2,? extends T3,? extends T4> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5> ITuple5<T1,T2,T3,T4,T5> downCast(@NotNull ITuple5<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6> ITuple6<T1,T2,T3,T4,T5,T6> downCast(@NotNull ITuple6<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7> ITuple7<T1,T2,T3,T4,T5,T6,T7> downCast(@NotNull ITuple7<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8> ITuple8<T1,T2,T3,T4,T5,T6,T7,T8> downCast(@NotNull ITuple8<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types@NotNull public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> ITuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> downCast(@NotNull ITuple9<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9> tuple)
T1
- required first element typeT2
- required second element typeT3
- required third element typeT4
- required fourth element typeT5
- required fifth element typeT6
- required sixth element typeT7
- required seventh element typeT8
- required eighth element typeT9
- required ninth element typetuple
- tuple to be viewed, with element types which are extensions of the required typestuple
with adapted element types