Package org.jsoup.select

Class Evaluator

java.lang.Object
org.jsoup.select.Evaluator
Direct Known Subclasses:
CombiningEvaluator, Evaluator.AllElements, Evaluator.Attribute, Evaluator.AttributeKeyPair, Evaluator.AttributeStarting, Evaluator.AttributeWithValueMatching, Evaluator.Class, Evaluator.ContainsData, Evaluator.ContainsOwnText, Evaluator.ContainsText, Evaluator.CssNthEvaluator, Evaluator.Id, Evaluator.IndexEvaluator, Evaluator.IsEmpty, Evaluator.IsFirstChild, Evaluator.IsLastChild, Evaluator.IsOnlyChild, Evaluator.IsOnlyOfType, Evaluator.IsRoot, Evaluator.Matches, Evaluator.MatchesOwn, Evaluator.MatchText, Evaluator.Tag, Evaluator.TagEndsWith

public abstract class Evaluator
extends Object
Evaluates that an element matches the selector.
  • Constructor Details

    • Evaluator

      protected Evaluator()
  • Method Details

    • matches

      public abstract boolean matches​(Element root, Element element)
      Test if the element meets the evaluator's requirements.
      Parameters:
      root - Root of the matching subtree
      element - tested element
      Returns:
      Returns true if the requirements are met or false otherwise