public ImmutableTreeNode makeImmutableCopy() {
        if (this.children == null) {
            return new ImmutableTreeNode(null);
        } else {
            return new ImmutableTreeNode(this.children.entrySet().stream()
                    .map(e -> Maps.immutableEntry(
                            e.getKey(),
                            e.getValue().makeImmutableCopy()
                    ))
            );
        }
    }
Represents one "branch" or "level" of the node tree
common/src/main/java/me/lucko/luckperms/common/treeview/TreeNode.java