Class Tuple5<T1,T2,T3,T4,T5>
java.lang.Object
io.vavr.Tuple5<T1,T2,T3,T4,T5>
- Type Parameters:
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 element
- All Implemented Interfaces:
Tuple, Serializable, Comparable<Tuple5<T1,T2, T3, T4, T5>>
public final class Tuple5<T1,T2,T3,T4,T5>
extends Object
implements Tuple, Comparable<Tuple5<T1,T2,T3,T4,T5>>, Serializable
A tuple of 5 elements which can be seen as cartesian product of 5 components.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_1()Getter of the 1st element of this tuple._2()Getter of the 2nd element of this tuple._3()Getter of the 3rd element of this tuple._4()Getter of the 4th element of this tuple._5()Getter of the 5th element of this tuple.append(T6 t6) Append a value to this tuple.<U> UTransforms this tuple to an object of type U.intarity()Returns the number of elements of this tuple.static <T1,T2, T3, T4, T5>
Comparator<Tuple5<T1, T2, T3, T4, T5>> comparator(Comparator<? super T1> t1Comp, Comparator<? super T2> t2Comp, Comparator<? super T3> t3Comp, Comparator<? super T4> t4Comp, Comparator<? super T5> t5Comp) private static <U1 extends Comparable<? super U1>, U2 extends Comparable<? super U2>, U3 extends Comparable<? super U3>, U4 extends Comparable<? super U4>, U5 extends Comparable<? super U5>>
intintConcat a tuple's values to this tuple.Concat a tuple's values to this tuple.Concat a tuple's values to this tuple.booleaninthashCode()<U1,U2, U3, U4, U5>
Tuple5<U1, U2, U3, U4, U5> map(Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, Tuple5<U1, U2, U3, U4, U5>> mapper) Maps the components of this tuple using a mapper function.<U1,U2, U3, U4, U5>
Tuple5<U1, U2, U3, U4, U5> map(Function<? super T1, ? extends U1> f1, Function<? super T2, ? extends U2> f2, Function<? super T3, ? extends U3> f3, Function<? super T4, ? extends U4> f4, Function<? super T5, ? extends U5> f5) Maps the components of this tuple using a mapper function for each component.Maps the 1st component of this tuple to a new value.Maps the 2nd component of this tuple to a new value.Maps the 3rd component of this tuple to a new value.Maps the 4th component of this tuple to a new value.Maps the 5th component of this tuple to a new value.Seq<?> toSeq()Converts this tuple to a sequence.toString()Sets the 1st element of this tuple to the givenvalue.Sets the 2nd element of this tuple to the givenvalue.Sets the 3rd element of this tuple to the givenvalue.Sets the 4th element of this tuple to the givenvalue.Sets the 5th element of this tuple to the givenvalue.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
_1
The 1st element of this tuple. -
_2
The 2nd element of this tuple. -
_3
The 3rd element of this tuple. -
_4
The 4th element of this tuple. -
_5
The 5th element of this tuple.
-
-
Constructor Details
-
Tuple5
-
-
Method Details
-
comparator
public static <T1,T2, Comparator<Tuple5<T1,T3, T4, T5> T2, comparatorT3, T4, T5>> (Comparator<? super T1> t1Comp, Comparator<? super T2> t2Comp, Comparator<? super T3> t3Comp, Comparator<? super T4> t4Comp, Comparator<? super T5> t5Comp) -
compareTo
private static <U1 extends Comparable<? super U1>, U2 extends Comparable<? super U2>, U3 extends Comparable<? super U3>, U4 extends Comparable<? super U4>, U5 extends Comparable<? super U5>> int compareTo(Tuple5<?, ?, ?, ?, ?> o1, Tuple5<?, ?, ?, ?, ?> o2) -
arity
-
compareTo
-
_1
-
update1
-
_2
-
update2
-
_3
-
update3
-
_4
-
update4
-
_5
-
update5
-
map
public <U1,U2, Tuple5<U1,U3, U4, U5> U2, mapU3, U4, U5> (Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, Tuple5<U1, U2, U3, U4, U5>> mapper) Maps the components of this tuple using a mapper function.- Type Parameters:
U1- new type of the 1st componentU2- new type of the 2nd componentU3- new type of the 3rd componentU4- new type of the 4th componentU5- new type of the 5th component- Parameters:
mapper- the mapper function- Returns:
- A new Tuple of same arity.
- Throws:
NullPointerException- ifmapperis null
-
map
public <U1,U2, Tuple5<U1,U3, U4, U5> U2, mapU3, U4, U5> (Function<? super T1, ? extends U1> f1, Function<? super T2, ? extends U2> f2, Function<? super T3, ? extends U3> f3, Function<? super T4, ? extends U4> f4, Function<? super T5, ? extends U5> f5) Maps the components of this tuple using a mapper function for each component.- Type Parameters:
U1- new type of the 1st componentU2- new type of the 2nd componentU3- new type of the 3rd componentU4- new type of the 4th componentU5- new type of the 5th component- Parameters:
f1- the mapper function of the 1st componentf2- the mapper function of the 2nd componentf3- the mapper function of the 3rd componentf4- the mapper function of the 4th componentf5- the mapper function of the 5th component- Returns:
- A new Tuple of same arity.
- Throws:
NullPointerException- if one of the arguments is null
-
map1
-
map2
-
map3
-
map4
-
map5
-
apply
public <U> U apply(Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends U> f) Transforms this tuple to an object of type U.- Type Parameters:
U- type of the transformation result- Parameters:
f- Transformation which creates a new object of type U based on this tuple's contents.- Returns:
- An object of type U
- Throws:
NullPointerException- iffis null
-
toSeq
-
append
-
concat
Concat a tuple's values to this tuple.- Type Parameters:
T6- the type of the 6th value in the tuple- Parameters:
tuple- the tuple to concat- Returns:
- a new Tuple with the tuple values appended
- Throws:
NullPointerException- iftupleis null
-
concat
Concat a tuple's values to this tuple.- Type Parameters:
T6- the type of the 6th value in the tupleT7- the type of the 7th value in the tuple- Parameters:
tuple- the tuple to concat- Returns:
- a new Tuple with the tuple values appended
- Throws:
NullPointerException- iftupleis null
-
concat
Concat a tuple's values to this tuple.- Type Parameters:
T6- the type of the 6th value in the tupleT7- the type of the 7th value in the tupleT8- the type of the 8th value in the tuple- Parameters:
tuple- the tuple to concat- Returns:
- a new Tuple with the tuple values appended
- Throws:
NullPointerException- iftupleis null
-
equals
-
hashCode
-
toString
-