Package tools.refinery.store.tuple
Record Class Tuple2
java.lang.Object
java.lang.Record
tools.refinery.store.tuple.Tuple2
- All Implemented Interfaces:
Comparable<Tuple>
,Tuple
-
Constructor Summary
ConstructorDescriptionTuple2
(int value0, int value1) Creates an instance of aTuple2
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Indicates whether some other object is "equal to" this one.int
get
(int element) int
getSize()
int
hashCode()
Returns a hash code value for this object.set
(int element, int value) toString()
Returns a string representation of this record class.int
value0()
Returns the value of thevalue0
record component.int
value1()
Returns the value of thevalue1
record component.
-
Constructor Details
-
Tuple2
public Tuple2(int value0, int value1) Creates an instance of aTuple2
record class.- Parameters:
value0
- the value for thevalue0
record componentvalue1
- the value for thevalue1
record component
-
-
Method Details
-
getSize
public int getSize() -
get
public int get(int element) -
set
-
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. -
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 with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
compareTo
- Specified by:
compareTo
in interfaceComparable<Tuple>
- Specified by:
compareTo
in interfaceTuple
-
value0
public int value0()Returns the value of thevalue0
record component.- Returns:
- the value of the
value0
record component
-
value1
public int value1()Returns the value of thevalue1
record component.- Returns:
- the value of the
value1
record component
-