boolean matchRoot(@NotNull String candidate) {
      if (!prefix && candidate.length() != root.length()) {
        return false;
      }
      return candidate.regionMatches(!caseSensitive, 0, root, 0, root.length());
    }
boolean matchRoot(@NotNull String candidate)