Class CssSelector

    • Constructor Detail

      • CssSelector

        public CssSelector​(java.util.List<ICssSelectorItem> selectorItems)
        Creates a new CssSelector instance.
        Parameters:
        selectorItems - the selector items
      • CssSelector

        public CssSelector​(java.lang.String selector)
        Creates a new CssSelector instance.
        Parameters:
        selector - the selector
    • Method Detail

      • matches

        public boolean matches​(INode element)
        Description copied from interface: ICssSelector
        Checks if a node matches the selector.
        Parameters:
        element - the node
        Returns:
        true, if the selector is a match for the node
      • matches

        private boolean matches​(INode element,
                                int lastSelectorItemInd)
        Checks if a node matches the selector.
        Parameters:
        element - the node
        lastSelectorItemInd - the index of the last selector
        Returns:
        true, if there's a match