Class StructuralEvaluator.ImmediateParentRun

java.lang.Object
org.jsoup.select.Evaluator
org.jsoup.select.StructuralEvaluator
org.jsoup.select.StructuralEvaluator.ImmediateParentRun
Enclosing class:
StructuralEvaluator

static class StructuralEvaluator.ImmediateParentRun extends StructuralEvaluator
Holds a list of evaluators for one > two > three immediate parent matches, and the final direct evaluator under test. To match, these are effectively ANDed together, starting from the last, matching up to the first.
  • Field Details

  • Constructor Details

    • ImmediateParentRun

      public ImmediateParentRun(Evaluator evaluator)
  • Method Details

    • add

      void add(Evaluator evaluator)
    • evaluateMatch

      boolean evaluateMatch(Element root, Node node)
      Specified by:
      evaluateMatch in class StructuralEvaluator
    • cost

      protected int cost()
      Description copied from class: Evaluator
      A relative evaluator cost function. During evaluation, Evaluators are sorted by ascending cost as an optimization.
      Overrides:
      cost in class Evaluator
      Returns:
      the relative cost of this Evaluator
    • reset

      protected void reset()
      Description copied from class: Evaluator
      Reset any internal state in this Evaluator before executing a new Collector evaluation.
      Overrides:
      reset in class StructuralEvaluator
    • toString

      public String toString()
      Overrides:
      toString in class Object