Top Description Fields Methods
io.vavr

public Interface Tuple

extends Serializable
Known Direct Implementers
io.vavr.Tuple0, io.vavr.Tuple1, io.vavr.Tuple2, io.vavr.Tuple3, io.vavr.Tuple4, io.vavr.Tuple5, io.vavr.Tuple6, io.vavr.Tuple7, io.vavr.Tuple8
Imports
io.vavr.collection.Seq, .Stream, java.io.Serializable, java.util.Map, .Objects

The base interface of all tuples.
Author
Daniel Dietrich

Field Summary

Modifier and TypeField and Description
public static final int
MAX_ARITY

The maximum arity of an Tuple.

public static final long

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of elements.
arity
()

Returns the number of elements of this tuple.

public static Tuple0

Returns:

the empty tuple.
empty
()

Creates the empty tuple.

public static <
Type of first component (entry key)
T1
,
Type of second component (entry value)
T2
>
Tuple2<T1, T2>

Returns:

a new Tuple2 containing key and value of the given entry
fromEntry
(Map.Entry<? extends T1, ? extends T2> entry)

Creates a Tuple2 from a Map.Entry.

public static int

Returns:

the same result as Objects#hashCode(Object)
hash
(Object
the 1st value to hash
o1
)

Return the order-dependent hash of the one given value.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
)

Return the order-dependent hash of the two given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
)

Return the order-dependent hash of the three given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
,
Object
the 4th value to hash
o4
)

Return the order-dependent hash of the 4 given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
,
Object
the 4th value to hash
o4
,
Object
the 5th value to hash
o5
)

Return the order-dependent hash of the 5 given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
,
Object
the 4th value to hash
o4
,
Object
the 5th value to hash
o5
,
Object
the 6th value to hash
o6
)

Return the order-dependent hash of the 6 given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
,
Object
the 4th value to hash
o4
,
Object
the 5th value to hash
o5
,
Object
the 6th value to hash
o6
,
Object
the 7th value to hash
o7
)

Return the order-dependent hash of the 7 given values.

public static int

Returns:

the same result as Objects#hash(Object...)
hash
(Object
the 1st value to hash
o1
,
Object
the 2nd value to hash
o2
,
Object
the 3rd value to hash
o3
,
Object
the 4th value to hash
o4
,
Object
the 5th value to hash
o5
,
Object
the 6th value to hash
o6
,
Object
the 7th value to hash
o7
,
Object
the 8th value to hash
o8
)

Return the order-dependent hash of the 8 given values.

public static <
the 1st component type
T1
>
Tuple1<T1>

Returns:

the given t instance as narrowed type Tuple1<T1>.
narrow
(Tuple1<? extends T1>
A Tuple1.
t
)

Narrows a widened Tuple1<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
>
Tuple2<T1, T2>

Returns:

the given t instance as narrowed type Tuple2<T1, T2>.
narrow
(Tuple2<? extends T1, ? extends T2>
A Tuple2.
t
)

Narrows a widened Tuple2<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
>
Tuple3<T1, T2, T3>

Returns:

the given t instance as narrowed type Tuple3<T1, T2, T3>.
narrow
(Tuple3<? extends T1, ? extends T2, ? extends T3>
A Tuple3.
t
)

Narrows a widened Tuple3<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
,
the 4th component type
T4
>
Tuple4<T1, T2, T3, T4>

Returns:

the given t instance as narrowed type Tuple4<T1, T2, T3, T4>.
narrow
(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4>
A Tuple4.
t
)

Narrows a widened Tuple4<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
,
the 4th component type
T4
,
the 5th component type
T5
>
Tuple5<T1, T2, T3, T4, T5>

Returns:

the given t instance as narrowed type Tuple5<T1, T2, T3, T4, T5>.
narrow
(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5>
A Tuple5.
t
)

Narrows a widened Tuple5<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
,
the 4th component type
T4
,
the 5th component type
T5
,
the 6th component type
T6
>
Tuple6<T1, T2, T3, T4, T5, T6>

Returns:

the given t instance as narrowed type Tuple6<T1, T2, T3, T4, T5, T6>.
narrow
(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6>
A Tuple6.
t
)

Narrows a widened Tuple6<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
,
the 4th component type
T4
,
the 5th component type
T5
,
the 6th component type
T6
,
the 7th component type
T7
>
Tuple7<T1, T2, T3, T4, T5, T6, T7>

Returns:

the given t instance as narrowed type Tuple7<T1, T2, T3, T4, T5, T6, T7>.
narrow
(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>
A Tuple7.
t
)

Narrows a widened Tuple7<?

public static <
the 1st component type
T1
,
the 2nd component type
T2
,
the 3rd component type
T3
,
the 4th component type
T4
,
the 5th component type
T5
,
the 6th component type
T6
,
the 7th component type
T7
,
the 8th component type
T8
>
Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>

Returns:

the given t instance as narrowed type Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>.
narrow
(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8>
A Tuple8.
t
)

Narrows a widened Tuple8<?

public static <
type of the 1st element
T1
>
Tuple1<T1>

Returns:

a tuple of one element.
of
(T1
the 1st element
t1
)

Creates a tuple of one element.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
>
Tuple2<T1, T2>

Returns:

a tuple of two elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
)

Creates a tuple of two elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
>
Tuple3<T1, T2, T3>

Returns:

a tuple of three elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
)

Creates a tuple of three elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
,
type of the 4th element
T4
>
Tuple4<T1, T2, T3, T4>

Returns:

a tuple of 4 elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
,
T4
the 4th element
t4
)

Creates a tuple of 4 elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
,
type of the 4th element
T4
,
type of the 5th element
T5
>
Tuple5<T1, T2, T3, T4, T5>

Returns:

a tuple of 5 elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
,
T4
the 4th element
t4
,
T5
the 5th element
t5
)

Creates a tuple of 5 elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
,
type of the 4th element
T4
,
type of the 5th element
T5
,
type of the 6th element
T6
>
Tuple6<T1, T2, T3, T4, T5, T6>

Returns:

a tuple of 6 elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
,
T4
the 4th element
t4
,
T5
the 5th element
t5
,
T6
the 6th element
t6
)

Creates a tuple of 6 elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
,
type of the 4th element
T4
,
type of the 5th element
T5
,
type of the 6th element
T6
,
type of the 7th element
T7
>
Tuple7<T1, T2, T3, T4, T5, T6, T7>

Returns:

a tuple of 7 elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
,
T4
the 4th element
t4
,
T5
the 5th element
t5
,
T6
the 6th element
t6
,
T7
the 7th element
t7
)

Creates a tuple of 7 elements.

public static <
type of the 1st element
T1
,
type of the 2nd element
T2
,
type of the 3rd element
T3
,
type of the 4th element
T4
,
type of the 5th element
T5
,
type of the 6th element
T6
,
type of the 7th element
T7
,
type of the 8th element
T8
>
Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>

Returns:

a tuple of 8 elements.
of
(T1
the 1st element
t1
,
T2
the 2nd element
t2
,
T3
the 3rd element
t3
,
T4
the 4th element
t4
,
T5
the 5th element
t5
,
T6
the 6th element
t6
,
T7
the 7th element
t7
,
T8
the 8th element
t8
)

Creates a tuple of 8 elements.

public static <
1st component type
T1
>
Tuple1<Seq<T1>>

Returns:

a tuple of one Seq.
sequence1
(Iterable<? extends Tuple1<? extends T1>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple1 into a Tuple1 of Seq.

public static <
1st component type
T1
,
2nd component type
T2
>
Tuple2<Seq<T1>, Seq<T2>>

Returns:

a tuple of two Seqs.
sequence2
(Iterable<? extends Tuple2<? extends T1, ? extends T2>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple2 into a Tuple2 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
>
Tuple3<Seq<T1>, Seq<T2>, Seq<T3>>

Returns:

a tuple of three Seqs.
sequence3
(Iterable<? extends Tuple3<? extends T1, ? extends T2, ? extends T3>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple3 into a Tuple3 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
,
4th component type
T4
>
Tuple4<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>>

Returns:

a tuple of 4 Seqs.
sequence4
(Iterable<? extends Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple4 into a Tuple4 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
,
4th component type
T4
,
5th component type
T5
>
Tuple5<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>>

Returns:

a tuple of 5 Seqs.
sequence5
(Iterable<? extends Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple5 into a Tuple5 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
,
4th component type
T4
,
5th component type
T5
,
6th component type
T6
>
Tuple6<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>>

Returns:

a tuple of 6 Seqs.
sequence6
(Iterable<? extends Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple6 into a Tuple6 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
,
4th component type
T4
,
5th component type
T5
,
6th component type
T6
,
7th component type
T7
>
Tuple7<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>>

Returns:

a tuple of 7 Seqs.
sequence7
(Iterable<? extends Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple7 into a Tuple7 of Seqs.

public static <
1st component type
T1
,
2nd component type
T2
,
3rd component type
T3
,
4th component type
T4
,
5th component type
T5
,
6th component type
T6
,
7th component type
T7
,
8th component type
T8
>
Tuple8<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>, Seq<T8>>

Returns:

a tuple of 8 Seqs.
sequence8
(Iterable<? extends Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8>>
an Iterable of tuples
tuples
)

Turns a sequence of Tuple8 into a Tuple8 of Seqs.

public Seq<?>

Returns:

A new Seq.
toSeq
()

Converts this tuple to a sequence.

Field Detail

MAX_ARITYback to summary
public static final int MAX_ARITY

The maximum arity of an Tuple.

Note

This value might be changed in a future version of Vavr. So it is recommended to use this constant instead of hardcoding the current maximum arity.

serialVersionUIDback to summary
public static final long serialVersionUID

Method Detail

arityback to summary
public int arity()

Returns the number of elements of this tuple.

Returns:int

the number of elements.

emptyback to summary
public static Tuple0 empty()

Creates the empty tuple.

Returns:Tuple0

the empty tuple.

fromEntryback to summary
public static <T1, T2> Tuple2<T1, T2> fromEntry(Map.Entry<? extends T1, ? extends T2> entry)

Creates a Tuple2 from a Map.Entry.

Parameters
<T1>
Type of first component (entry key)
<T2>
Type of second component (entry value)
entry:Map.Entry<? extends T1, ? extends T2>

A java.util.Map.Entry

Returns:Tuple2<T1, T2>

a new Tuple2 containing key and value of the given entry

hashback to summary
public static int hash(Object o1)

Return the order-dependent hash of the one given value.

Parameters
o1:Object

the 1st value to hash

Returns:int

the same result as Objects#hashCode(Object)

hashback to summary
public static int hash(Object o1, Object o2)

Return the order-dependent hash of the two given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3)

Return the order-dependent hash of the three given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3, Object o4)

Return the order-dependent hash of the 4 given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

o4:Object

the 4th value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3, Object o4, Object o5)

Return the order-dependent hash of the 5 given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

o4:Object

the 4th value to hash

o5:Object

the 5th value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6)

Return the order-dependent hash of the 6 given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

o4:Object

the 4th value to hash

o5:Object

the 5th value to hash

o6:Object

the 6th value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7)

Return the order-dependent hash of the 7 given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

o4:Object

the 4th value to hash

o5:Object

the 5th value to hash

o6:Object

the 6th value to hash

o7:Object

the 7th value to hash

Returns:int

the same result as Objects#hash(Object...)

hashback to summary
public static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8)

Return the order-dependent hash of the 8 given values.

Parameters
o1:Object

the 1st value to hash

o2:Object

the 2nd value to hash

o3:Object

the 3rd value to hash

o4:Object

the 4th value to hash

o5:Object

the 5th value to hash

o6:Object

the 6th value to hash

o7:Object

the 7th value to hash

o8:Object

the 8th value to hash

Returns:int

the same result as Objects#hash(Object...)

narrowback to summary
public static <T1> Tuple1<T1> narrow(Tuple1<? extends T1> t)

Narrows a widened Tuple1<? extends T1> to Tuple1<T1>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
t:Tuple1<? extends T1>

A Tuple1.

Returns:Tuple1<T1>

the given t instance as narrowed type Tuple1<T1>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2> Tuple2<T1, T2> narrow(Tuple2<? extends T1, ? extends T2> t)

Narrows a widened Tuple2<? extends T1, ? extends T2> to Tuple2<T1, T2>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
t:Tuple2<? extends T1, ? extends T2>

A Tuple2.

Returns:Tuple2<T1, T2>

the given t instance as narrowed type Tuple2<T1, T2>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3> Tuple3<T1, T2, T3> narrow(Tuple3<? extends T1, ? extends T2, ? extends T3> t)

Narrows a widened Tuple3<? extends T1, ? extends T2, ? extends T3> to Tuple3<T1, T2, T3>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
t:Tuple3<? extends T1, ? extends T2, ? extends T3>

A Tuple3.

Returns:Tuple3<T1, T2, T3>

the given t instance as narrowed type Tuple3<T1, T2, T3>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3, T4> Tuple4<T1, T2, T3, T4> narrow(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> t)

Narrows a widened Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> to Tuple4<T1, T2, T3, T4>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
<T4>
the 4th component type
t:Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4>

A Tuple4.

Returns:Tuple4<T1, T2, T3, T4>

the given t instance as narrowed type Tuple4<T1, T2, T3, T4>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> narrow(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> t)

Narrows a widened Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> to Tuple5<T1, T2, T3, T4, T5>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
<T4>
the 4th component type
<T5>
the 5th component type
t:Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5>

A Tuple5.

Returns:Tuple5<T1, T2, T3, T4, T5>

the given t instance as narrowed type Tuple5<T1, T2, T3, T4, T5>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3, T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> narrow(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> t)

Narrows a widened Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> to Tuple6<T1, T2, T3, T4, T5, T6>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
<T4>
the 4th component type
<T5>
the 5th component type
<T6>
the 6th component type
t:Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6>

A Tuple6.

Returns:Tuple6<T1, T2, T3, T4, T5, T6>

the given t instance as narrowed type Tuple6<T1, T2, T3, T4, T5, T6>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> narrow(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> t)

Narrows a widened Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> to Tuple7<T1, T2, T3, T4, T5, T6, T7>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
<T4>
the 4th component type
<T5>
the 5th component type
<T6>
the 6th component type
<T7>
the 7th component type
t:Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>

A Tuple7.

Returns:Tuple7<T1, T2, T3, T4, T5, T6, T7>

the given t instance as narrowed type Tuple7<T1, T2, T3, T4, T5, T6, T7>.

Annotations
@SuppressWarnings:unchecked
narrowback to summary
public static <T1, T2, T3, T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> narrow(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> t)

Narrows a widened Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> to Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>. This is eligible because immutable/read-only tuples are covariant.

Parameters
<T1>
the 1st component type
<T2>
the 2nd component type
<T3>
the 3rd component type
<T4>
the 4th component type
<T5>
the 5th component type
<T6>
the 6th component type
<T7>
the 7th component type
<T8>
the 8th component type
t:Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8>

A Tuple8.

Returns:Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>

the given t instance as narrowed type Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>.

Annotations
@SuppressWarnings:unchecked
ofback to summary
public static <T1> Tuple1<T1> of(T1 t1)

Creates a tuple of one element.

Parameters
<T1>
type of the 1st element
t1:T1

the 1st element

Returns:Tuple1<T1>

a tuple of one element.

ofback to summary
public static <T1, T2> Tuple2<T1, T2> of(T1 t1, T2 t2)

Creates a tuple of two elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
t1:T1

the 1st element

t2:T2

the 2nd element

Returns:Tuple2<T1, T2>

a tuple of two elements.

ofback to summary
public static <T1, T2, T3> Tuple3<T1, T2, T3> of(T1 t1, T2 t2, T3 t3)

Creates a tuple of three elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

Returns:Tuple3<T1, T2, T3>

a tuple of three elements.

ofback to summary
public static <T1, T2, T3, T4> Tuple4<T1, T2, T3, T4> of(T1 t1, T2 t2, T3 t3, T4 t4)

Creates a tuple of 4 elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
<T4>
type of the 4th element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

t4:T4

the 4th element

Returns:Tuple4<T1, T2, T3, T4>

a tuple of 4 elements.

ofback to summary
public static <T1, T2, T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)

Creates a tuple of 5 elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
<T4>
type of the 4th element
<T5>
type of the 5th element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

t4:T4

the 4th element

t5:T5

the 5th element

Returns:Tuple5<T1, T2, T3, T4, T5>

a tuple of 5 elements.

ofback to summary
public 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)

Creates a tuple of 6 elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
<T4>
type of the 4th element
<T5>
type of the 5th element
<T6>
type of the 6th element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

t4:T4

the 4th element

t5:T5

the 5th element

t6:T6

the 6th element

Returns:Tuple6<T1, T2, T3, T4, T5, T6>

a tuple of 6 elements.

ofback to summary
public 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)

Creates a tuple of 7 elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
<T4>
type of the 4th element
<T5>
type of the 5th element
<T6>
type of the 6th element
<T7>
type of the 7th element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

t4:T4

the 4th element

t5:T5

the 5th element

t6:T6

the 6th element

t7:T7

the 7th element

Returns:Tuple7<T1, T2, T3, T4, T5, T6, T7>

a tuple of 7 elements.

ofback to summary
public 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)

Creates a tuple of 8 elements.

Parameters
<T1>
type of the 1st element
<T2>
type of the 2nd element
<T3>
type of the 3rd element
<T4>
type of the 4th element
<T5>
type of the 5th element
<T6>
type of the 6th element
<T7>
type of the 7th element
<T8>
type of the 8th element
t1:T1

the 1st element

t2:T2

the 2nd element

t3:T3

the 3rd element

t4:T4

the 4th element

t5:T5

the 5th element

t6:T6

the 6th element

t7:T7

the 7th element

t8:T8

the 8th element

Returns:Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>

a tuple of 8 elements.

sequence1back to summary
public static <T1> Tuple1<Seq<T1>> sequence1(Iterable<? extends Tuple1<? extends T1>> tuples)

Turns a sequence of Tuple1 into a Tuple1 of Seq.

Parameters
<T1>
1st component type
tuples:Iterable<? extends Tuple1<? extends T1>>

an Iterable of tuples

Returns:Tuple1<Seq<T1>>

a tuple of one Seq.

sequence2back to summary
public static <T1, T2> Tuple2<Seq<T1>, Seq<T2>> sequence2(Iterable<? extends Tuple2<? extends T1, ? extends T2>> tuples)

Turns a sequence of Tuple2 into a Tuple2 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
tuples:Iterable<? extends Tuple2<? extends T1, ? extends T2>>

an Iterable of tuples

Returns:Tuple2<Seq<T1>, Seq<T2>>

a tuple of two Seqs.

sequence3back to summary
public static <T1, T2, T3> Tuple3<Seq<T1>, Seq<T2>, Seq<T3>> sequence3(Iterable<? extends Tuple3<? extends T1, ? extends T2, ? extends T3>> tuples)

Turns a sequence of Tuple3 into a Tuple3 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
tuples:Iterable<? extends Tuple3<? extends T1, ? extends T2, ? extends T3>>

an Iterable of tuples

Returns:Tuple3<Seq<T1>, Seq<T2>, Seq<T3>>

a tuple of three Seqs.

sequence4back to summary
public static <T1, T2, T3, T4> Tuple4<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>> sequence4(Iterable<? extends Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4>> tuples)

Turns a sequence of Tuple4 into a Tuple4 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
<T4>
4th component type
tuples:Iterable<? extends Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4>>

an Iterable of tuples

Returns:Tuple4<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>>

a tuple of 4 Seqs.

sequence5back to summary
public static <T1, T2, T3, T4, T5> Tuple5<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>> sequence5(Iterable<? extends Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5>> tuples)

Turns a sequence of Tuple5 into a Tuple5 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
<T4>
4th component type
<T5>
5th component type
tuples:Iterable<? extends Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5>>

an Iterable of tuples

Returns:Tuple5<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>>

a tuple of 5 Seqs.

sequence6back to summary
public static <T1, T2, T3, T4, T5, T6> Tuple6<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>> sequence6(Iterable<? extends Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6>> tuples)

Turns a sequence of Tuple6 into a Tuple6 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
<T4>
4th component type
<T5>
5th component type
<T6>
6th component type
tuples:Iterable<? extends Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6>>

an Iterable of tuples

Returns:Tuple6<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>>

a tuple of 6 Seqs.

sequence7back to summary
public static <T1, T2, T3, T4, T5, T6, T7> Tuple7<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>> sequence7(Iterable<? extends Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>> tuples)

Turns a sequence of Tuple7 into a Tuple7 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
<T4>
4th component type
<T5>
5th component type
<T6>
6th component type
<T7>
7th component type
tuples:Iterable<? extends Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>>

an Iterable of tuples

Returns:Tuple7<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>>

a tuple of 7 Seqs.

sequence8back to summary
public static <T1, T2, T3, T4, T5, T6, T7, T8> Tuple8<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>, Seq<T8>> sequence8(Iterable<? extends Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8>> tuples)

Turns a sequence of Tuple8 into a Tuple8 of Seqs.

Parameters
<T1>
1st component type
<T2>
2nd component type
<T3>
3rd component type
<T4>
4th component type
<T5>
5th component type
<T6>
6th component type
<T7>
7th component type
<T8>
8th component type
tuples:Iterable<? extends Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8>>

an Iterable of tuples

Returns:Tuple8<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>, Seq<T8>>

a tuple of 8 Seqs.

toSeqback to summary
public Seq<?> toSeq()

Converts this tuple to a sequence.

Returns:Seq<?>

A new Seq.