Record Class CssSelector.PseudoClassSelector
java.lang.Object
java.lang.Record
dev.jcputney.mjml.css.CssSelector.PseudoClassSelector
- Record Components:
name- the pseudo-class name (without the leading colon)argument- the optional argument for functional pseudo-classes, ornull
- All Implemented Interfaces:
CssSelector, CssSelector.SimpleSelector
- Enclosing interface:
CssSelector
public static record CssSelector.PseudoClassSelector(String name, String argument)
extends Record
implements CssSelector.SimpleSelector
A pseudo-class selector (e.g. ":hover", ":nth-child(2)").
-
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
ConstructorsConstructorDescriptionPseudoClassSelector(String name, String argument) Creates an instance of aPseudoClassSelectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargument()Returns the value of theargumentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Computes the specificity of this selector.toString()Returns a string representation of this record class.
-
Constructor Details
-
PseudoClassSelector
-
-
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). -
name
-
argument
-