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