Package org.xhtmlrenderer.css.parser
Record Class HSBColor
java.lang.Object
java.lang.Record
org.xhtmlrenderer.css.parser.HSBColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
The field for thebrightness
record component.private final float
The field for thehue
record component.private final float
The field for thesaturation
record component. -
Constructor Summary
ConstructorsConstructorDescriptionHSBColor
(float hue, float saturation, float brightness) Creates an instance of aHSBColor
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of thebrightness
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.float
hue()
Returns the value of thehue
record component.float
Returns the value of thesaturation
record component.toRGB()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
hue
private final float hueThe field for thehue
record component. -
saturation
private final float saturationThe field for thesaturation
record component. -
brightness
private final float brightnessThe field for thebrightness
record component.
-
-
Constructor Details
-
HSBColor
public HSBColor(float hue, float saturation, float brightness) Creates an instance of aHSBColor
record class.- Parameters:
hue
- the value for thehue
record componentsaturation
- the value for thesaturation
record componentbrightness
- the value for thebrightness
record 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 thehue
record component.- Returns:
- the value of the
hue
record component
-
saturation
public float saturation()Returns the value of thesaturation
record component.- Returns:
- the value of the
saturation
record component
-
brightness
public float brightness()Returns the value of thebrightness
record component.- Returns:
- the value of the
brightness
record component
-