Package dev.turboism.sdk.cubism.model
Record Class Color
java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.model.Color
Immutable RGBA color value projected from a Cubism provider.
Components are finite floating-point values. This type deliberately does not claim a fixed normalization range because the exposed source contracts validate finiteness only. It is a detached value and does not expose mutable backend color storage.
-
Constructor Summary
ConstructorsConstructorDescriptionColor(float red, float green, float blue, float alpha) Creates a color whose four components are finite. -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha()Returns the value of thealpharecord component.floatblue()Returns the value of thebluerecord component.final booleanIndicates whether some other object is "equal to" this one.floatgreen()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.floatred()Returns the value of theredrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Color
public Color(float red, float green, float blue, float alpha) Creates a color whose four components are finite.- Parameters:
red- red componentgreen- green componentblue- blue componentalpha- alpha component
-
-
Method Details
-
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. -
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. -
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 '=='. -
red
public float red()Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
green
public float green()Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
blue
public float blue()Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-
alpha
public float alpha()Returns the value of thealpharecord component.- Returns:
- the value of the
alpharecord component
-