Record Class CssSelector.ComplexSelector
java.lang.Object
java.lang.Record
dev.jcputney.mjml.css.CssSelector.ComplexSelector
- Record Components:
left- the left-hand selectorcombinator- the combinator joining left and rightright- the right-hand selector
- All Implemented Interfaces:
CssSelector
- Enclosing interface:
CssSelector
public static record CssSelector.ComplexSelector(CssSelector left, CssSelector.Combinator combinator, CssSelector right)
extends Record
implements CssSelector
A complex selector joining two selectors with a combinator (e.g. "div > p").
-
Nested Class Summary
Nested classes/interfaces inherited from interface CssSelector
CssSelector.AttributeSelector, CssSelector.ClassSelector, CssSelector.Combinator, CssSelector.ComplexSelector, CssSelector.CompoundSelector, CssSelector.IdSelector, CssSelector.PseudoClassSelector, CssSelector.PseudoElementSelector, CssSelector.SelectorList, CssSelector.SimpleSelector, CssSelector.TypeSelector, CssSelector.UniversalSelector -
Constructor Summary
ConstructorsConstructorDescriptionComplexSelector(CssSelector left, CssSelector.Combinator combinator, CssSelector right) Creates an instance of aComplexSelectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecombinatorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.right()Returns the value of therightrecord component.Computes the specificity of this selector.toString()Returns a string representation of this record class.
-
Constructor Details
-
ComplexSelector
Creates an instance of aComplexSelectorrecord class.- Parameters:
left- the value for theleftrecord componentcombinator- the value for thecombinatorrecord componentright- the value for therightrecord component
-
-
Method Details
-
specificity
Description copied from interface:CssSelectorComputes the specificity of this selector.- Specified by:
specificityin interfaceCssSelector- Returns:
- the computed specificity for this selector
-
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). -
left
-
combinator
Returns the value of thecombinatorrecord component.- Returns:
- the value of the
combinatorrecord component
-
right
-