Class IdSelector

  • All Implemented Interfaces:
    Serializable

    public class IdSelector
    extends Selector
    An attribute selector matches document nodes based on their attributes. http://www.w3.org/TR/css3-selectors/#attribute-selectors Typically written as '[foo=bar]'.
    Author:
    nhant01, GeorgeLuo
    See Also:
    Serialized Form
    • Constructor Detail

      • IdSelector

        public IdSelector​(@Nonnull
                          String value)
        Parameters:
        value - to set to
    • Method Detail

      • accept

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

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

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