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
ConstructorsConstructorDescriptionTuple2(int value0, int value1) Creates an instance of aTuple2record class. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanIndicates whether some other object is "equal to" this one.intget(int element) intgetSize()inthashCode()Returns a hash code value for this object.set(int element, int value) toString()Returns a string representation of this record class.intvalue0()Returns the value of thevalue0record component.intvalue1()Returns the value of thevalue1record component.
-
Constructor Details
-
Tuple2
public Tuple2(int value0, int value1) Creates an instance of aTuple2record class.- Parameters:
value0- the value for thevalue0record componentvalue1- the value for thevalue1record 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:
compareToin interfaceComparable<Tuple>- Specified by:
compareToin interfaceTuple
-
value0
public int value0()Returns the value of thevalue0record component.- Returns:
- the value of the
value0record component
-
value1
public int value1()Returns the value of thevalue1record component.- Returns:
- the value of the
value1record component
-