Class CssPseudoClassNthSelectorItem

All Implemented Interfaces:
ICssSelectorItem
Direct Known Subclasses:
CssPseudoClassNthChildSelectorItem, CssPseudoClassNthOfTypeSelectorItem

class CssPseudoClassNthSelectorItem extends CssPseudoClassChildSelectorItem
  • Field Details

    • nthA

      private int nthA
      The nth A.
    • nthB

      private int nthB
      The nth B.
  • Constructor Details

    • CssPseudoClassNthSelectorItem

      CssPseudoClassNthSelectorItem(String pseudoClass, String arguments)
  • Method Details

    • matches

      public boolean matches(INode node)
      Description copied from interface: ICssSelectorItem
      Checks if the selector matches an element.
      Specified by:
      matches in interface ICssSelectorItem
      Overrides:
      matches in class CssPseudoClassSelectorItem
      Parameters:
      node - the element
      Returns:
      true, if there's a match
    • getNthArguments

      protected void getNthArguments()
      Gets the nth arguments.
    • resolveNth

      protected boolean resolveNth(INode node, List<INode> children)
      Resolves the nth.
      Parameters:
      node - a node
      children - the children
      Returns:
      true, if successful