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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstantColor(int color) ConstantColor(int lightModeColor, int darkModeColor) Creates an instance of aConstantColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedarkModeColorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelightModeColorrecord component.intresolve(LightDarkMode lightDarkMode) Resolve as ARGB 32-bit.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
WHITE
-
BLACK
-
TRANSPARENT
-
-
Constructor Details
-
ConstantColor
public ConstantColor(int color) -
ConstantColor
public ConstantColor(int lightModeColor, int darkModeColor) Creates an instance of aConstantColorrecord class.- Parameters:
lightModeColor- the value for thelightModeColorrecord componentdarkModeColor- the value for thedarkModeColorrecord component
-
-
Method Details
-
resolve
Description copied from interface:ColorValueResolve as ARGB 32-bit.- Specified by:
resolvein 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 thelightModeColorrecord component.- Returns:
- the value of the
lightModeColorrecord component
-
darkModeColor
public int darkModeColor()Returns the value of thedarkModeColorrecord component.- Returns:
- the value of the
darkModeColorrecord component
-