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
ConstructorsConstructorDescriptionDrawTrig(int x1, int y1, int x2, int y2, int x3, int y3) Creates an instance of aDrawTrigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intx1()Returns the value of thex1record component.intx2()Returns the value of thex2record component.intx3()Returns the value of thex3record component.inty1()Returns the value of they1record component.inty2()Returns the value of they2record component.inty3()Returns the value of they3record component.
-
Constructor Details
-
DrawTrig
public DrawTrig(int x1, int y1, int x2, int y2, int x3, int y3) Creates an instance of aDrawTrigrecord class.- Parameters:
x1- the value for thex1record componenty1- the value for they1record componentx2- the value for thex2record componenty2- the value for they2record componentx3- the value for thex3record componenty3- the value for they3record component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
x1
public int x1()Returns the value of thex1record component.- Returns:
- the value of the
x1record component
-
y1
public int y1()Returns the value of they1record component.- Returns:
- the value of the
y1record component
-
x2
public int x2()Returns the value of thex2record component.- Returns:
- the value of the
x2record component
-
y2
public int y2()Returns the value of they2record component.- Returns:
- the value of the
y2record component
-
x3
public int x3()Returns the value of thex3record component.- Returns:
- the value of the
x3record component
-
y3
public int y3()Returns the value of they3record component.- Returns:
- the value of the
y3record component
-