Package org.jsoup.select

Class Evaluator.IsRoot

java.lang.Object
org.jsoup.select.Evaluator
org.jsoup.select.Evaluator.IsRoot
Enclosing class:
Evaluator

public static final class Evaluator.IsRoot extends Evaluator
css3 pseudo-class :root
See Also:
  • Constructor Details

    • IsRoot

      public IsRoot()
  • 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
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object