class PathTrie {

    public void put(String path, T value) {
        checkNotEmpty(path);
        requireNonNull(value);

        List<String> components = pathToComponents(Paths.get(removeAsterisk(path)));

        if (path.endsWith("/") || path.endsWith("/*")) {
            // it is a directory
            components.add("/");
        }

        T existing = tree.getExactMatch(components);
        if (existing != null) {
            String message = format("Path '%s' has already been configured with a ID of [%s]",
                    path, existing.toString());
            throw new DuplicatePathException(message);
        }

        tree.addValueWithParents(components, value);
    }

    public  PathTrie();

}