Example #1
0
 public void addChild(GenericTreeNode<T> child) {
   child.parent = this;
   children.add(child);
 }
Example #2
0
 public void addChildAt(int index, GenericTreeNode<T> child) throws IndexOutOfBoundsException {
   child.parent = this;
   children.add(index, child);
 }
Example #3
0
 public void setChildren(List<GenericTreeNode<T>> children) {
   for (GenericTreeNode<T> child : children) {
     child.parent = this;
   }
   this.children = children;
 }