Class 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 Detail

      • ClassSelector

        public ClassSelector​(@Nonnull
                             String value)
        Parameters:
        value - the class to match.
    • Method Detail

      • accept

        public void accept​(@Nonnull
                           SelectorVisitor visitor)
        visits a selector
        Specified by:
        accept in class Selector
        Parameters:
        visitor - a SelectorVisitor instance
      • getTokenType

        public TokenType getTokenType()
        get token type
        Specified by:
        getTokenType in class Token
        Returns:
        the token type
      • toString

        public String toString()
        generates a string representation
        Overrides:
        toString in class Token
        Returns:
        to string representation