T
- Type of the property value.public interface IColorField<T extends Serializable> extends Serializable, Comparable<IColorField<?>>
IGuiColor
of a EColorPalette
.Modifier and Type | Method and Description |
---|---|
default int |
compareTo(IColorField<?> o) |
boolean |
equals(Object obj)
Implementations MUST make the comparison only with respect to
getIdentifier() . |
default T |
get(IGuiColor color)
Gets the value of this field from the given color.
|
default T |
get(IGuiColor color,
T defaultValue)
Gets the value of this field from the given color.
|
String |
getIdentifier() |
int |
hashCode()
Implementations MUST calculate the hash code only from the
getIdentifier() . |
default boolean |
supportedBy(IGuiColor color)
If a sub class overrides
get(IGuiColor) , they should also override this method. |
default int compareTo(IColorField<?> o)
compareTo
in interface Comparable<IColorField<?>>
boolean equals(Object obj)
getIdentifier()
.default T get(IGuiColor color) throws IllegalArgumentException
IGuiColor.getField(IColorField)
. Sub classes may implement logic, such as computing the value from another
field. If you do override this method, also override supportedBy(IGuiColor)
.color
- Color from which to get the value.IllegalArgumentException
- When this field is not supported by the given color.default T get(IGuiColor color, T defaultValue)
IGuiColor.getField(IColorField)
. Sub classes may implement logic, such as computing the value from another
field.color
- Color from which to get the value.defaultValue
- Value to return when this field is not supported by the given color.String getIdentifier()
int hashCode()
getIdentifier()
.default boolean supportedBy(IGuiColor color)
get(IGuiColor)
, they should also override this method.color
- A color to check.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.