Record Class DrawInstruction.SetColor
java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.DrawInstruction.SetColor
- All Implemented Interfaces:
DrawInstruction
- Enclosing interface:
DrawInstruction
public static record DrawInstruction.SetColor(int r, int g, int b, int a)
extends Record
implements DrawInstruction
-
Nested Class Summary
Nested classes/interfaces inherited from interface DrawInstruction
DrawInstruction.DrawRect, DrawInstruction.DrawTrig, DrawInstruction.SetColor -
Constructor Summary
ConstructorsConstructorDescriptionSetColor(int r, int g, int b, int a) Creates an instance of aSetColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioninta()Returns the value of thearecord component.intb()Returns the value of thebrecord component.final booleanIndicates whether some other object is "equal to" this one.intg()Returns the value of thegrecord component.final inthashCode()Returns a hash code value for this object.intr()Returns the value of therrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SetColor
public SetColor(int r, int g, int b, int a) Creates an instance of aSetColorrecord class.- Parameters:
r- the value for therrecord componentg- the value for thegrecord componentb- the value for thebrecord componenta- the value for thearecord 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. -
r
public int r()Returns the value of therrecord component.- Returns:
- the value of the
rrecord component
-
g
public int g()Returns the value of thegrecord component.- Returns:
- the value of the
grecord component
-
b
public int b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-
a
public int a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-