Record Class SimplifiedRGB
java.lang.Object
java.lang.Record
dev.zwazel.internal.game.misc.SimplifiedRGB
-
Constructor Summary
ConstructorsConstructorDescriptionSimplifiedRGB
(float r, float g, float b) Creates an instance of aSimplifiedRGB
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
b()
Returns the value of theb
record component.final boolean
Indicates whether some other object is "equal to" this one.float
g()
Returns the value of theg
record component.final int
hashCode()
Returns a hash code value for this object.float
r()
Returns the value of ther
record component.toColor()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SimplifiedRGB
public SimplifiedRGB(float r, float g, float b) Creates an instance of aSimplifiedRGB
record class.- Parameters:
r
- the value for ther
record componentg
- the value for theg
record componentb
- the value for theb
record component
-
-
Method Details
-
toColor
-
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 thecompare
method from their corresponding wrapper classes. -
r
public float r()Returns the value of ther
record component.- Returns:
- the value of the
r
record component
-
g
public float g()Returns the value of theg
record component.- Returns:
- the value of the
g
record component
-
b
public float b()Returns the value of theb
record component.- Returns:
- the value of the
b
record component
-