Record Class Tuple3

java.lang.Object
java.lang.Record
tools.refinery.store.tuple.Tuple3
All Implemented Interfaces:
Comparable<Tuple>, Tuple

public record Tuple3(int value0, int value1, int value2) extends Record implements Tuple
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tuple3(int value0, int value1, int value2)
    Creates an instance of a Tuple3 record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(@NotNull Tuple other)
     
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    get(int element)
     
    int
     
    int
    Returns a hash code value for this object.
    set(int element, int value)
     
    Returns a string representation of this record class.
    int
    Returns the value of the value0 record component.
    int
    Returns the value of the value1 record component.
    int
    Returns the value of the value2 record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Tuple3

      public Tuple3(int value0, int value1, int value2)
      Creates an instance of a Tuple3 record class.
      Parameters:
      value0 - the value for the value0 record component
      value1 - the value for the value1 record component
      value2 - the value for the value2 record component
  • Method Details

    • getSize

      public int getSize()
      Specified by:
      getSize in interface Tuple
    • get

      public int get(int element)
      Specified by:
      get in interface Tuple
    • set

      public Tuple set(int element, int value)
      Specified by:
      set in interface Tuple
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • equals

      public boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • compareTo

      public int compareTo(@NotNull @NotNull Tuple other)
      Specified by:
      compareTo in interface Comparable<Tuple>
      Specified by:
      compareTo in interface Tuple
    • value0

      public int value0()
      Returns the value of the value0 record component.
      Returns:
      the value of the value0 record component
    • value1

      public int value1()
      Returns the value of the value1 record component.
      Returns:
      the value of the value1 record component
    • value2

      public int value2()
      Returns the value of the value2 record component.
      Returns:
      the value of the value2 record component