Record Class CssDeclaration
java.lang.Object
java.lang.Record
dev.jcputney.mjml.css.CssDeclaration
- Record Components:
property- the CSS property name (lower-cased)value- the property valueimportant- whether!importantwas specified
-
Constructor Summary
ConstructorsConstructorDescriptionCssDeclaration(String property, String value, boolean important) Creates an instance of aCssDeclarationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theimportantrecord component.static CssDeclarationParses a single declaration string like "color: red !property()Returns the value of thepropertyrecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
CssDeclaration
-
-
Method Details
-
parse
Parses a single declaration string like "color: red !important".- Parameters:
text- the declaration string to parse- Returns:
- the parsed declaration, or null if the string is not a valid declaration
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
property
-
value
-
important
-