java.lang.Object
java.lang.Record
org.xhtmlrenderer.css.parser.HSBColor
-
Constructor Summary
ConstructorsConstructorDescriptionHSBColor(float hue, float saturation, float brightness) Creates an instance of aHSBColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thebrightnessrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floathue()Returns the value of thehuerecord component.floatReturns the value of thesaturationrecord component.toRGB()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HSBColor
public HSBColor(float hue, float saturation, float brightness) Creates an instance of aHSBColorrecord class.- Parameters:
hue- the value for thehuerecord componentsaturation- the value for thesaturationrecord componentbrightness- the value for thebrightnessrecord component
-
-
Method Details
-
toRGB
-
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 '=='. -
hue
public float hue()Returns the value of thehuerecord component.- Returns:
- the value of the
huerecord component
-
saturation
public float saturation()Returns the value of thesaturationrecord component.- Returns:
- the value of the
saturationrecord component
-
brightness
public float brightness()Returns the value of thebrightnessrecord component.- Returns:
- the value of the
brightnessrecord component
-