Record Class DrawInstruction.DrawTrig

java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.DrawInstruction.DrawTrig
All Implemented Interfaces:
DrawInstruction
Enclosing interface:
DrawInstruction

public static record DrawInstruction.DrawTrig(int x1, int y1, int x2, int y2, int x3, int y3) extends Record implements DrawInstruction
  • Nested Class Summary

    Nested classes/interfaces inherited from interface DrawInstruction

    DrawInstruction.DrawRect, DrawInstruction.DrawTrig, DrawInstruction.SetColor
  • Constructor Summary

    Constructors
    Constructor
    Description
    DrawTrig(int x1, int y1, int x2, int y2, int x3, int y3)
    Creates an instance of a DrawTrig record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.
    int
    x1()
    Returns the value of the x1 record component.
    int
    x2()
    Returns the value of the x2 record component.
    int
    x3()
    Returns the value of the x3 record component.
    int
    y1()
    Returns the value of the y1 record component.
    int
    y2()
    Returns the value of the y2 record component.
    int
    y3()
    Returns the value of the y3 record component.

    Methods inherited from class Object

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

    • DrawTrig

      public DrawTrig(int x1, int y1, int x2, int y2, int x3, int y3)
      Creates an instance of a DrawTrig record class.
      Parameters:
      x1 - the value for the x1 record component
      y1 - the value for the y1 record component
      x2 - the value for the x2 record component
      y2 - the value for the y2 record component
      x3 - the value for the x3 record component
      y3 - the value for the y3 record component
  • Method Details

    • toString

      public final 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
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final 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 the compare method from their corresponding wrapper classes.
      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.
    • x1

      public int x1()
      Returns the value of the x1 record component.
      Returns:
      the value of the x1 record component
    • y1

      public int y1()
      Returns the value of the y1 record component.
      Returns:
      the value of the y1 record component
    • x2

      public int x2()
      Returns the value of the x2 record component.
      Returns:
      the value of the x2 record component
    • y2

      public int y2()
      Returns the value of the y2 record component.
      Returns:
      the value of the y2 record component
    • x3

      public int x3()
      Returns the value of the x3 record component.
      Returns:
      the value of the x3 record component
    • y3

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