Class StructuralEvaluator.Has

Enclosing class:
StructuralEvaluator

static class StructuralEvaluator.Has extends StructuralEvaluator
  • Field Details

    • NodeIterPool

      static final SoftPool<NodeIterator<Node>> NodeIterPool
    • checkSiblings

      private final boolean checkSiblings
  • Constructor Details

  • Method Details

    • matches

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

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

      private static boolean evalWantsSiblings(Evaluator eval)
    • 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