Class Evaluator.CssNthEvaluator

    • Field Detail

      • a

        protected final int a
      • b

        protected final int b
    • Constructor Detail

      • CssNthEvaluator

        public CssNthEvaluator​(int a,
                               int b)
      • CssNthEvaluator

        public CssNthEvaluator​(int b)
    • Method Detail

      • matches

        public boolean matches​(Element root,
                               Element element)
        Description copied from class: Evaluator
        Test if the element meets the evaluator's requirements.
        Specified by:
        matches in class Evaluator
        Parameters:
        root - Root of the matching subtree
        element - tested element
        Returns:
        Returns true if the requirements are met or false otherwise
      • getPseudoClass

        protected abstract String getPseudoClass()
      • calculatePosition

        protected abstract int calculatePosition​(Element root,
                                                 Element element)