java.lang.Object
java.lang.Record
overrungl.util.value.Tuple2<T,U>
- Type Parameters:
T- the first type.U- the second type.- Record Components:
x- the first value.y- the second value.
A tuple of 2 objects.
- Since:
- 0.1.0
- Author:
- squid233
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA value object with an object and an integer.static final recordA tuple of an object and a long. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.first()Returnsx.final inthashCode()Returns a hash code value for this object.key()Returnsx.left()Returnsx.right()Returnsy.second()Returnsy.final StringtoString()Returns a string representation of this record class.value()Returnsy.x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.
-
Constructor Details
-
Method Details
-
first
Returnsx.- Returns:
x
-
second
Returnsy.- Returns:
y
-
left
Returnsx.- Returns:
x
-
right
Returnsy.- Returns:
y
-
key
Returnsx.- Returns:
x
-
value
Returnsy.- Returns:
y
-
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). -
x
Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-