Record Class ColourScheme.Colour
java.lang.Object
java.lang.Record
net.minecraftforge.fml.earlydisplay.ColourScheme.Colour
- Enclosing class:
- ColourScheme
-
Field Summary
-
Constructor Summary
ConstructorDescriptionColour
(int red, int green, int blue) Creates an instance of aColour
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
blue()
Returns the value of theblue
record component.float
bluef()
final boolean
Indicates whether some other object is "equal to" this one.int
green()
Returns the value of thegreen
record component.float
greenf()
final int
hashCode()
Returns a hash code value for this object.int
packedint
(int a) int
red()
Returns the value of thered
record component.float
redf()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
red
private final int redThe field for thered
record component. -
green
private final int greenThe field for thegreen
record component. -
blue
private final int blueThe field for theblue
record component.
-
-
Constructor Details
-
Colour
public Colour(int red, int green, int blue) Creates an instance of aColour
record class.- Parameters:
red
- the value for thered
record componentgreen
- the value for thegreen
record componentblue
- the value for theblue
record component
-
-
Method Details
-
redf
public float redf() -
greenf
public float greenf() -
bluef
public float bluef() -
packedint
public int packedint(int a) -
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 int red()Returns the value of thered
record component.- Returns:
- the value of the
red
record component
-
green
public int green()Returns the value of thegreen
record component.- Returns:
- the value of the
green
record component
-
blue
public int blue()Returns the value of theblue
record component.- Returns:
- the value of the
blue
record component
-