Record Class RGBAColor
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.utils.RGBAColor
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.inttoARGB()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RGBAColor
public RGBAColor(int r, int g, int b) -
RGBAColor
public RGBAColor(int r, int g, int b, int a) Creates an instance of aRGBAColorrecord 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
-
toARGB
public int toARGB() -
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 '=='. -
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
-