Record Class CssValues.CssColor
java.lang.Object
java.lang.Record
org.eclipse.e4.ui.css.core.impl.dom.CssValues.CssColor
- All Implemented Interfaces:
CssValues.CssPrimitive, CssValues.CssValue, CSSPrimitiveValue, CSSValue, RGBColor
- Enclosing class:
CssValues
public static record CssValues.CssColor(CssValues.CssNumeric red, CssValues.CssNumeric green, CssValues.CssNumeric blue)
extends Record
implements CssValues.CssPrimitive, RGBColor
rgb(...) or a #rgb / #rrggbb colour.-
Field Summary
Fields inherited from interface CSSPrimitiveValue
CSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URIFields inherited from interface CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST -
Constructor Summary
ConstructorsConstructorDescriptionCssColor(CssValues.CssNumeric red, CssValues.CssNumeric green, CssValues.CssNumeric blue) Creates an instance of aCssColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblue()Returns the value of thebluerecord component.final booleanIndicates whether some other object is "equal to" this one.getBlue()getGreen()shortgetRed()green()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.red()Returns the value of theredrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface CssValues.CssPrimitive
getCounterValue, getCssValueType, getFloatValue, getRectValue, getStringValue, setCssText, setFloatValue, setStringValue
-
Constructor Details
-
CssColor
Creates an instance of aCssColorrecord class.- Parameters:
red- the value for theredrecord componentgreen- the value for thegreenrecord componentblue- the value for thebluerecord component
-
-
Method Details
-
getPrimitiveType
public short getPrimitiveType()- Specified by:
getPrimitiveTypein interfaceCSSPrimitiveValue
-
getRGBColorValue
- Specified by:
getRGBColorValuein interfaceCSSPrimitiveValue- Specified by:
getRGBColorValuein interfaceCssValues.CssPrimitive
-
getRed
-
getGreen
-
getBlue
-
getCssText
- Specified by:
getCssTextin interfaceCSSValue
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
red
Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
green
Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
blue
Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-