Record Class CssRule
java.lang.Object
java.lang.Record
dev.jcputney.mjml.css.CssRule
- Record Components:
selectorText- the raw selector text (may contain commas for selector lists)declarations- the list of property declarations in this rule
A CSS rule consisting of a selector string and a list of declarations. For example:
.red {
color: red; font-weight: bold; }-
Constructor Summary
ConstructorsConstructorDescriptionCssRule(String selectorText, List<CssDeclaration> declarations) Creates an instance of aCssRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclarationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theselectorTextrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CssRule
Creates an instance of aCssRulerecord class.- Parameters:
selectorText- the value for theselectorTextrecord componentdeclarations- the value for thedeclarationsrecord component
-
-
Method Details
-
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). -
selectorText
Returns the value of theselectorTextrecord component.- Returns:
- the value of the
selectorTextrecord component
-
declarations
Returns the value of thedeclarationsrecord component.- Returns:
- the value of the
declarationsrecord component
-