Package org.jsoup.select

Class Evaluator.CssNthEvaluator

java.lang.Object
org.jsoup.select.Evaluator
org.jsoup.select.Evaluator.CssNthEvaluator
Direct Known Subclasses:
Evaluator.IsNthChild, Evaluator.IsNthLastChild, Evaluator.IsNthLastOfType, Evaluator.IsNthOfType
Enclosing class:
Evaluator

public abstract static class Evaluator.CssNthEvaluator extends Evaluator
  • Field Details

    • a

      protected final int a
    • b

      protected final int b
  • Constructor Details

    • CssNthEvaluator

      public CssNthEvaluator(int a, int b)
    • CssNthEvaluator

      public CssNthEvaluator(int b)
  • Method Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPseudoClass

      protected abstract String getPseudoClass()
    • calculatePosition

      protected abstract int calculatePosition(Element root, Element element)