nodes into a new node group (i.e. cluster). Creates an upper node in the tree and appends nodes to it. Content of nodes can be existing groups. In that case, nodes must only contains roots of groups. Therefore all nodes in nodes must have the same parent. The method returns the newly created group of nodes.
@param nodes the nodes to be grouped in a new group
@return the newly created group of nodes which contains nodes and descendants of nodes
@throws IllegalArgumentException if nodes is null,or if nodes is empty, or if content nodes are not legal in the graph, or if nodes' parent is not similar between elements
@throws IllegalMonitorStateException if the current thread is holding a read lock
| |