Modifier and Type | Field and Description |
---|---|
static int |
MAX_ARITY
The maximum arity of an Tuple.
|
Modifier and Type | Method and Description |
---|---|
int |
arity()
Returns the number of elements of this tuple.
|
static Tuple0 |
empty()
Creates the empty tuple.
|
static <T1,T2> Tuple2<T1,T2> |
fromEntry(Map.Entry<? extends T1,? extends T2> entry)
Creates a
Tuple2 from a Map.Entry . |
static int |
hash(Object o1)
Return the order-dependent hash of the one given value.
|
static int |
hash(Object o1,
Object o2)
Return the order-dependent hash of the two given values.
|
static int |
hash(Object o1,
Object o2,
Object o3)
Return the order-dependent hash of the three given values.
|
static int |
hash(Object o1,
Object o2,
Object o3,
Object o4)
Return the order-dependent hash of the 4 given values.
|
static int |
hash(Object o1,
Object o2,
Object o3,
Object o4,
Object o5)
Return the order-dependent hash of the 5 given values.
|
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.
|
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.
|
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.
|
static <T1> Tuple1<T1> |
narrow(Tuple1<? extends T1> t)
Narrows a widened
Tuple1<? extends T1> to Tuple1<T1> . |
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> . |
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> . |
static <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> . |
static <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> . |
static <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> . |
static <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> . |
static <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> . |
static <T1> Tuple1<T1> |
of(T1 t1)
Creates a tuple of one element.
|
static <T1,T2> Tuple2<T1,T2> |
of(T1 t1,
T2 t2)
Creates a tuple of two elements.
|
static <T1,T2,T3> Tuple3<T1,T2,T3> |
of(T1 t1,
T2 t2,
T3 t3)
Creates a tuple of three elements.
|
static <T1,T2,T3,T4> |
of(T1 t1,
T2 t2,
T3 t3,
T4 t4)
Creates a tuple of 4 elements.
|
static <T1,T2,T3,T4,T5> |
of(T1 t1,
T2 t2,
T3 t3,
T4 t4,
T5 t5)
Creates a tuple of 5 elements.
|
static <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.
|
static <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.
|
static <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.
|
static <T1> Tuple1<Seq<T1>> |
sequence1(Iterable<? extends Tuple1<? extends T1>> tuples)
Turns a sequence of
Tuple1 into a Tuple1 of Seq . |
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 Seq s. |
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 Seq s. |
static <T1,T2,T3,T4> |
sequence4(Iterable<? extends Tuple4<? extends T1,? extends T2,? extends T3,? extends T4>> tuples)
Turns a sequence of
Tuple4 into a Tuple4 of Seq s. |
static <T1,T2,T3,T4,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 Seq s. |
static <T1,T2,T3,T4,T5,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 Seq s. |
static <T1,T2,T3,T4,T5,T6,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 Seq s. |
static <T1,T2,T3,T4,T5,T6,T7,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 Seq s. |
Seq<?> |
toSeq()
Converts this tuple to a sequence.
|
static final int MAX_ARITY
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.
int arity()
Seq<?> toSeq()
Seq
.static Tuple0 empty()
static <T1,T2> Tuple2<T1,T2> fromEntry(Map.Entry<? extends T1,? extends T2> entry)
Tuple2
from a Map.Entry
.T1
- Type of first component (entry key)T2
- Type of second component (entry value)entry
- A Map.Entry
Tuple2
containing key and value of the given entry
static <T1> Tuple1<T1> of(T1 t1)
T1
- type of the 1st elementt1
- the 1st elementstatic <T1,T2> Tuple2<T1,T2> of(T1 t1, T2 t2)
T1
- type of the 1st elementT2
- type of the 2nd elementt1
- the 1st elementt2
- the 2nd elementstatic <T1,T2,T3> Tuple3<T1,T2,T3> of(T1 t1, T2 t2, T3 t3)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementstatic <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> of(T1 t1, T2 t2, T3 t3, T4 t4)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementstatic <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementstatic <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)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementstatic <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)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementT7
- type of the 7th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementt7
- the 7th elementstatic <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)
T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementT7
- type of the 7th elementT8
- type of the 8th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementt7
- the 7th elementt8
- the 8th elementstatic int hash(Object o1)
o1
- the 1st value to hashObjects.hashCode(Object)
static int hash(Object o1, Object o2)
o1
- the 1st value to hasho2
- the 2nd value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3, Object o4)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hasho4
- the 4th value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3, Object o4, Object o5)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hasho4
- the 4th value to hasho5
- the 5th value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hasho4
- the 4th value to hasho5
- the 5th value to hasho6
- the 6th value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hasho4
- the 4th value to hasho5
- the 5th value to hasho6
- the 6th value to hasho7
- the 7th value to hashObjects.hash(Object...)
static int hash(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8)
o1
- the 1st value to hasho2
- the 2nd value to hasho3
- the 3rd value to hasho4
- the 4th value to hasho5
- the 5th value to hasho6
- the 6th value to hasho7
- the 7th value to hasho8
- the 8th value to hashObjects.hash(Object...)
static <T1> Tuple1<T1> narrow(Tuple1<? extends T1> t)
Tuple1<? extends T1>
to Tuple1<T1>
.
This is eligible because immutable/read-only tuples are covariant.T1
- the 1st component typet
- A Tuple1
.t
instance as narrowed type Tuple1<T1>
.static <T1,T2> Tuple2<T1,T2> narrow(Tuple2<? extends T1,? extends T2> t)
Tuple2<? extends T1, ? extends T2>
to Tuple2<T1, T2>
.
This is eligible because immutable/read-only tuples are covariant.T1
- the 1st component typeT2
- the 2nd component typet
- A Tuple2
.t
instance as narrowed type Tuple2<T1, T2>
.static <T1,T2,T3> Tuple3<T1,T2,T3> narrow(Tuple3<? extends T1,? extends T2,? extends T3> t)
Tuple3<? extends T1, ? extends T2, ? extends T3>
to Tuple3<T1, T2, T3>
.
This is eligible because immutable/read-only tuples are covariant.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typet
- A Tuple3
.t
instance as narrowed type Tuple3<T1, T2, T3>
.static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> narrow(Tuple4<? extends T1,? extends T2,? extends T3,? extends T4> t)
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.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typeT4
- the 4th component typet
- A Tuple4
.t
instance as narrowed type Tuple4<T1, T2, T3, T4>
.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)
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.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typeT4
- the 4th component typeT5
- the 5th component typet
- A Tuple5
.t
instance as narrowed type Tuple5<T1, T2, T3, T4, T5>
.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)
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.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typeT4
- the 4th component typeT5
- the 5th component typeT6
- the 6th component typet
- A Tuple6
.t
instance as narrowed type Tuple6<T1, T2, T3, T4, T5, T6>
.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)
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.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typeT4
- the 4th component typeT5
- the 5th component typeT6
- the 6th component typeT7
- the 7th component typet
- A Tuple7
.t
instance as narrowed type Tuple7<T1, T2, T3, T4, T5, T6, T7>
.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)
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.T1
- the 1st component typeT2
- the 2nd component typeT3
- the 3rd component typeT4
- the 4th component typeT5
- the 5th component typeT6
- the 6th component typeT7
- the 7th component typeT8
- the 8th component typet
- A Tuple8
.t
instance as narrowed type Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>
.static <T1> Tuple1<Seq<T1>> sequence1(Iterable<? extends Tuple1<? extends T1>> tuples)
Tuple1
into a Tuple1 of Seq
.T1
- 1st component typetuples
- an Iterable
of tuplesSeq
.static <T1,T2> Tuple2<Seq<T1>,Seq<T2>> sequence2(Iterable<? extends Tuple2<? extends T1,? extends T2>> tuples)
Tuple2
into a Tuple2 of Seq
s.T1
- 1st component typeT2
- 2nd component typetuples
- an Iterable
of tuplesSeq
s.static <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> sequence3(Iterable<? extends Tuple3<? extends T1,? extends T2,? extends T3>> tuples)
Tuple3
into a Tuple3 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typetuples
- an Iterable
of tuplesSeq
s.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)
Tuple4
into a Tuple4 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typeT4
- 4th component typetuples
- an Iterable
of tuplesSeq
s.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)
Tuple5
into a Tuple5 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typeT4
- 4th component typeT5
- 5th component typetuples
- an Iterable
of tuplesSeq
s.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)
Tuple6
into a Tuple6 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typeT4
- 4th component typeT5
- 5th component typeT6
- 6th component typetuples
- an Iterable
of tuplesSeq
s.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)
Tuple7
into a Tuple7 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typeT4
- 4th component typeT5
- 5th component typeT6
- 6th component typeT7
- 7th component typetuples
- an Iterable
of tuplesSeq
s.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)
Tuple8
into a Tuple8 of Seq
s.T1
- 1st component typeT2
- 2nd component typeT3
- 3rd component typeT4
- 4th component typeT5
- 5th component typeT6
- 6th component typeT7
- 7th component typeT8
- 8th component typetuples
- an Iterable
of tuplesSeq
s.Copyright © 2019. All Rights Reserved.