Package com.storedobject.common
Record Class StyledBuilder.Style
java.lang.Object
java.lang.Record
com.storedobject.common.StyledBuilder.Style
- Record Components:
name
- Name of the style.value
- Value of the style.
- Enclosing interface:
StyledBuilder
Representation of HTML style.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StyledBuilder.Style[]
Create an array of Style instances from the given string that may contain multiple styles.static StyledBuilder.Style
Create a style from the given string.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Style
-
-
Method Details
-
create
Create a style from the given string.- Parameters:
s
- Text from which the style can be created. (It is of the form "color: red").- Returns:
- Style instance if an instance can be created. Otherwise, null.
-
array
Create an array of Style instances from the given string that may contain multiple styles. (Note: If invalid styles are part of the input, the output can contain null values corresponding to the invalid inputs).- Parameters:
multipleStyles
- String containing multiple styles.- Returns:
- Style array.
-
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)
. -
name
-
value
-