Record Class Tuple3<A,B,C>
java.lang.Object
java.lang.Record
dmx.fun.Tuple3<A,B,C>
- Type Parameters:
A- the type of the first elementB- the type of the second elementC- the type of the third element- Record Components:
_1- the first element_2- the second element_3- the third 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.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<R> Rmap(TriFunction<? super A, ? super B, ? super C, ? extends R> f) Collapses this triple into a single value by applyingfto all three elements.Returns a new tuple withfapplied to the first 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> Tuple3 <A, B, C> of(A a, B b, C c) Creates a newTuple3with the given elements.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Tuple3
-
-
Method Details
-
of
Creates a newTuple3with the given elements.- Type Parameters:
A- the type of the first elementB- the type of the second elementC- the type of the third element- Parameters:
a- the first elementb- the second elementc- the third element- Returns:
- a new
Tuple3containing the three 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
Tuple3with 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
Tuple3with 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
Tuple3with the transformed third element
-
map
Collapses this triple into a single value by applyingfto all three elements.- Type Parameters:
R- the type of the result- Parameters:
f- the combining function- Returns:
- the non-null result of applying
fto_1,_2, and_3
-
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
-