Record Class Tuple4<A,B,C,D>
java.lang.Object
java.lang.Record
dmx.fun.Tuple4<A,B,C,D>
- Type Parameters:
A- the type of the first elementB- the type of the second elementC- the type of the third elementD- the type of the fourth element- Record Components:
_1- the first element_2- the second element_3- the third element_4- the fourth element
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_1()Returns the value of the_1record component._2()Returns the value of the_2record component._3()Returns the value of the_3record component._4()Returns the value of the_4record component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<R> RCollapses this quadruple into a single value by applyingfto all four elements.Returns a new tuple withfapplied to the first element; the other elements are unchanged.Returns a new tuple withfapplied to the fourth element; the other elements are unchanged.Returns a new tuple withfapplied to the second element; the other elements are unchanged.Returns a new tuple withfapplied to the third element; the other elements are unchanged.static <A,B, C, D> Tuple4 <A, B, C, D> of(A a, B b, C c, D d) Creates a newTuple4with the given elements.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Tuple4
-
-
Method Details
-
of
Creates a newTuple4with the given elements.- Type Parameters:
A- the type of the first elementB- the type of the second elementC- the type of the third elementD- the type of the fourth element- Parameters:
a- the first elementb- the second elementc- the third elementd- the fourth element- Returns:
- a new
Tuple4containing the four values
-
mapFirst
Returns a new tuple withfapplied to the first element; the other elements are unchanged.- Type Parameters:
R- the type of the new first element- Parameters:
f- the mapping function- Returns:
- a new
Tuple4with the transformed first element
-
mapSecond
Returns a new tuple withfapplied to the second element; the other elements are unchanged.- Type Parameters:
R- the type of the new second element- Parameters:
f- the mapping function- Returns:
- a new
Tuple4with the transformed second element
-
mapThird
Returns a new tuple withfapplied to the third element; the other elements are unchanged.- Type Parameters:
R- the type of the new third element- Parameters:
f- the mapping function- Returns:
- a new
Tuple4with the transformed third element
-
mapFourth
Returns a new tuple withfapplied to the fourth element; the other elements are unchanged.- Type Parameters:
R- the type of the new fourth element- Parameters:
f- the mapping function- Returns:
- a new
Tuple4with the transformed fourth element
-
map
Collapses this quadruple into a single value by applyingfto all four elements.- Type Parameters:
R- the type of the result- Parameters:
f- the combining function- Returns:
- the non-null result of applying
fto_1,_2,_3, and_4
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
_1
-
_2
-
_3
-
_4
-