code: public boolean contains(Matcher matcher) {
          return element.matcher == matcher || (parent != null && parent.contains(matcher));
      }
docs: Determines whether the given matcher is contained in this path.
  
  @param matcher the matcher
  @return true if contained