public void setNodes(List<ConfiguredNode> nodes) {
        if (distribution != null) {
            throw new IllegalStateException("Cannot add nodes to non-leaf group with distribution set");
        }
        if (subgroups != null) {
            throw new IllegalStateException("Cannot add nodes to group with children");
        }
        this.nodes = new ArrayList<>(nodes);
        Collections.sort(this.nodes);
    }
Represent a group in the tree structure of groups in hierarchical setup of VDS nodes.
vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java