Record Class CssSelector.TypeSelector
java.lang.Object
java.lang.Record
dev.jcputney.mjml.css.CssSelector.TypeSelector
- Record Components:
tagName- the element tag name to match
- All Implemented Interfaces:
CssSelector, CssSelector.SimpleSelector
- Enclosing interface:
CssSelector
public static record CssSelector.TypeSelector(String tagName)
extends Record
implements CssSelector.SimpleSelector
A type (element name) selector (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
ConstructorsConstructorDescriptionTypeSelector(String tagName) Creates an instance of aTypeSelectorrecord 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.Computes the specificity of this selector.tagName()Returns the value of thetagNamerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
TypeSelector
-
-
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). -
tagName
-