Class Heuristics.Within

All Implemented Interfaces:
TreeVisitor<Boolean,Void>
Enclosing class:
Heuristics

public static class Heuristics.Within extends Heuristics.Matcher
match() returns true if called on a path, any element of which matches the given matcher (supplied at object initialization). That matcher is usually one that matches only the leaf of a path, ignoring all other parts of it.
  • Constructor Details

    • Within

      public Within(Heuristics.Matcher matcher)
      Create a new Within matcher.
      Parameters:
      matcher - the matcher that Within.match will try, on every parent of the path it is given
  • Method Details

    • match

      public boolean match(TreePath path)
      Description copied from class: Heuristics.Matcher
      Returns true if the given path matches this Matcher.
      Overrides:
      match in class Heuristics.Matcher
      Parameters:
      path - the path to test
      Returns:
      true if the given path matches this Matcher