Record Class Tuple<T1,T2>
java.lang.Object
java.lang.Record
de.wuespace.telestion.services.connection.rework.Tuple<T1,T2>
- Type Parameters:
T1
- Type 1T2
- Type 2- Record Components:
value1
- Value of Type 1value2
- Value of Type 2
A simple implementation of a Value-Pair whose values are linked together without any key - value relationship.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.value1()
Returns the value of thevalue1
record component.value2()
Returns the value of thevalue2
record component.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
value1
Returns the value of thevalue1
record component.- Returns:
- the value of the
value1
record component
-
value2
Returns the value of thevalue2
record component.- Returns:
- the value of the
value2
record component
-