Adds sibling nodes (defined using builder-style notation via a Closure) after the current node. @param c A Closure defining the new sibling nodes to add using builder-style notation.
(Closure c)
| 269 | * @param c A Closure defining the new sibling nodes to add using builder-style notation. |
| 270 | */ |
| 271 | public void plus(Closure c) { |
| 272 | if (parent() == null) { |
| 273 | throw new UnsupportedOperationException("Adding sibling nodes to the root node is not supported"); |
| 274 | } |
| 275 | appendNodes(c); |
| 276 | } |
| 277 | |
| 278 | private void appendNodes(Closure c) { |
| 279 | List tail = getTail(); |