Package dev.amp.validator.selector
Class ClassSelector
- java.lang.Object
-
- com.steadystate.css.parser.Token
-
- dev.amp.validator.css.Token
-
- dev.amp.validator.selector.Selector
-
- dev.amp.validator.selector.ClassSelector
-
- All Implemented Interfaces:
Serializable
public class ClassSelector extends Selector
A class selector of the form '.value' is a shorthand notation for an attribute match of the form '[class~=value]'. http://www.w3.org/TR/css3-selectors/#class-html- Author:
- nhant01, GeorgeLuo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassSelector(String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SelectorVisitor visitor)visits a selectorvoidforEachChild(Consumer<Selector> selector)TokenTypegetTokenType()get token typeStringtoString()generates a string representation
-
-
-
Constructor Detail
-
ClassSelector
public ClassSelector(@Nonnull String value)- Parameters:
value- the class to match.
-
-
Method Detail
-
forEachChild
public void forEachChild(Consumer<Selector> selector)
- Specified by:
forEachChildin classSelector- Parameters:
selector- selector function
-
accept
public void accept(@Nonnull SelectorVisitor visitor)visits a selector
-
getTokenType
public TokenType getTokenType()
get token type- Specified by:
getTokenTypein classToken- Returns:
- the token type
-
-