Class CombiningEvaluator.Or

Enclosing class:
CombiningEvaluator

public static final class CombiningEvaluator.Or extends CombiningEvaluator
  • Constructor Details

    • Or

      public Or(Collection<Evaluator> evaluators)
      Creates an evaluator that requires at least one supplied evaluator to match.
      Parameters:
      evaluators - alternative evaluators
  • Method Details

    • matches

      public boolean matches(Element root, Element element)
      Description copied from class: Evaluator
      Tests whether the element matches this evaluator.
      Specified by:
      matches in class Evaluator
      Parameters:
      root - the query context, used by :scope; for a Document, :scope matches its document element
      element - the element to test
      Returns:
      whether the element matches
    • matches

      public boolean matches(Element root, LeafNode leaf)
    • toString

      public String toString()
      Overrides:
      toString in class Object