@NotNull PathMatch match(@NotNull TreePath path) {
        if (Objects.equals(path.getParentPath(), matchSoFar)) {
          int count = path.getPathCount();
          boolean matches = elements[count - 1].isMatchTo(path.getLastPathComponent());
          if (matches) {
            if (count == elements.length) {
              return PathMatch.FULL;
            }
            else {
              matchSoFar = path;
              return PathMatch.PARTIAL;
            }
          }
          else {
            return PathMatch.NONE;
          }
        }
        else {
          return PathMatch.NONE;
        }
      }
@NotNull PathMatch match(@NotNull TreePath path)