Class Selector

java.lang.Object
org.joox.selector.Selector

class Selector extends Object
Represents a selector.

A selector has a tag name, a combinator and a list of specifiers.

See Also:
  • Field Details

  • Constructor Details

    • Selector

      public Selector()
      Create a new instance with the tag name set to the value of UNIVERSAL_TAG, and with the combinator set to Selector.Combinator.DESCENDANT. The list of specifiers will be set to null.
    • Selector

      public Selector(String tagName, Selector.Combinator combinator)
      Create a new instance with the specified tag name and combinator.

      The list of specifiers will be set to null.

      Parameters:
      tagName - The tag name to set.
      combinator - The combinator to set.
    • Selector

      public Selector(String tagName, List<Specifier> specifiers)
      Create a new instance with the specified tag name and list of specifiers.

      The combinator will be set to Selector.Combinator.DESCENDANT.

      Parameters:
      tagName - The tag name to set.
      specifiers - The list of specifiers to set.
    • Selector

      public Selector(String tagName, Selector.Combinator combinator, List<Specifier> specifiers)
      Create a new instance with the specified tag name, combinator and list of specifiers.
      Parameters:
      tagName - The tag name to set.
      combinator - The combinator to set.
      specifiers - The list of specifiers to set.
  • Method Details

    • getTagName

      public String getTagName()
      Get the tag name.
      Returns:
      The tag name.
    • getCombinator

      public Selector.Combinator getCombinator()
      Get the combinator.
      Returns:
      The combinator.
    • getSpecifiers

      public List<Specifier> getSpecifiers()
      Get the list of specifiers.
      Returns:
      The list of specifiers or null.
    • hasSpecifiers

      public boolean hasSpecifiers()
      Returns whether this selector has any specifiers or not.
      Returns:
      true or false.