class PropertiesExt {

    public static PropertyNode<Boolean> fullSplit(Collection<String> names) {
        PropertyNode<Boolean> root = new PropertyNode<>("ROOT", Optional.empty(), new HashMap<>());
        names.forEach(n -> {
            List<String> parts = StringExt.splitByDot(n);
            PropertyNode<Boolean> current = root;
            int lastIdx = parts.size() - 1;
            for (int i = 0; i < parts.size(); i++) {
                String name = parts.get(i);

                PropertyNode<Boolean> next = current.getChildren().get(name);
                if (next == null) {
                    next = new PropertyNode<>(name, Optional.empty(), new HashMap<>());
                    current.getChildren().put(name, next);
                }

                if (i == lastIdx) {
                    next.value = Optional.of(Boolean.TRUE);
                }
                current = next;
            }
        });
        return root;
    }

    private  PropertiesExt();

}