Class Selector

    • Field Detail

      • UNIVERSAL_TAG

        public static final java.lang.String UNIVERSAL_TAG
        The universal tag name (i.e. *).
        See Also:
        Constant Field Values
      • tagName

        private final java.lang.String tagName
        Tag name.
    • Constructor Detail

      • Selector

        public Selector​(java.lang.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​(java.lang.String tagName,
                        java.util.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​(java.lang.String tagName,
                        Selector.Combinator combinator,
                        java.util.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 Detail

      • getTagName

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

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

        public java.util.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.