Package guideme.color
Record Class ConstantColor
java.lang.Object
java.lang.Record
guideme.color.ConstantColor
- All Implemented Interfaces:
ColorValue
public record ConstantColor(int lightModeColor, int darkModeColor)
extends Record
implements ColorValue
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstantColor
(int color) ConstantColor
(int lightModeColor, int darkModeColor) Creates an instance of aConstantColor
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thedarkModeColor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelightModeColor
record component.int
resolve
(LightDarkMode lightDarkMode) Resolve as ARGB 32-bit.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
WHITE
-
-
Constructor Details
-
ConstantColor
public ConstantColor(int color) -
ConstantColor
public ConstantColor(int lightModeColor, int darkModeColor) Creates an instance of aConstantColor
record class.- Parameters:
lightModeColor
- the value for thelightModeColor
record componentdarkModeColor
- the value for thedarkModeColor
record component
-
-
Method Details
-
resolve
Description copied from interface:ColorValue
Resolve as ARGB 32-bit.- Specified by:
resolve
in interfaceColorValue
-
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 '=='. -
lightModeColor
public int lightModeColor()Returns the value of thelightModeColor
record component.- Returns:
- the value of the
lightModeColor
record component
-
darkModeColor
public int darkModeColor()Returns the value of thedarkModeColor
record component.- Returns:
- the value of the
darkModeColor
record component
-