Adds a new child node to a given MutableTreeNode parent.

@param parent the parent node
@param child  the child node to add
962703
public static <T extends MutableTreeNode<T>> void addChild(T parent, T child) {
        checkArgNotNull(parent, "parent");
        parent.addChild(parent.getChildren().size(), child);
    }
545682
public Element appendChild(Node child) {
        Validate.notNull(child);

        // was - Node#addChildren(child). short-circuits an array create and a loop.
        reparentChild(child);
        ensureChildNodes();
        childNodes.add(child);
        child.setSiblingIndex(childNodes.size() - 1);
        return this;
    }
761401
public RedwoodConfiguration handler(final LogRecordHandler parent, final LogRecordHandler child){
    tasks.add(new Runnable() { public void run() { Redwood.appendHandler(parent, child);} });
    return this;
  }
112946
public void addChild(Config child)
  {
    Params.notNull(child, "Child");
    child.parent = this;
    children.add(child);
  }
903478
private static void processJsonToTree(final TreeItemIdNode parentNode, final JsonObject json) {

		String id = json.getAsJsonPrimitive("id").getAsString();
		JsonPrimitive expandableJson = json.getAsJsonPrimitive("expandable");

		TreeItemIdNode node = new TreeItemIdNode(id);
		if (expandableJson != null && expandableJson.getAsBoolean()) {
			node.setHasChildren(true);
		}
		parentNode.addChild(node);

		JsonArray children = json.getAsJsonArray("items");
		if (children != null) {
			for (int i = 0; i < children.size(); i++) {
				JsonObject child = children.get(i).getAsJsonObject();
				processJsonToTree(node, child);
			}
		}
	}
1074164
void addRightChild(final byte b, @NotNull final MutableNode child) {
        final ChildReference right = children.getRight();
        if (right != null && (right.firstByte & 0xff) >= (b & 0xff)) {
            throw new IllegalArgumentException();
        }
        children.putRight(new ChildReferenceMutable(b, child));
    }
1261141
@SuppressWarnings("unchecked")
    public void addChild(final AbstractEdge<?> edge, final AbstractNode child) {
        if (child == null || edge == null ||
                edge.getIntervals() == null || edge.getIntervals().size() == 0) {
            throw new IllegalArgumentException("Cannot add null child or empty edge");
        }

        edge.setSubDiagram(child);
        edges.add((AbstractEdge<T>) edge);
    }
360594
@Override
	public void addChildAt(final int index, final ITreeNode<T> child)
		throws IndexOutOfBoundsException
	{
		if (children != null && children.size() < index)
		{
			children.add(index, child);
		}
		else
		{
			addChild(child);
		}
	}
681235
public void removeChild(String child)
    {
        final Xml node = getChild(child);
        root.removeChild(node.getElement());
    }
409097
protected void layout(TreeNode node) {
    if (node != null) {
      TreeNode child = node.child;

      while (child != null) {
        layout(child);
        child = child.next;
      }

      if (node.child != null) {
        attachParent(node, join(node));
      } else {
        layoutLeaf(node);
      }
    }
  }
799132
public function addChild(Node $child)
    {
        $this->children[]                           = $child;
        $child->parent                              = $this;
        $child->properties[$this->config['parent']] = $this->properties[$this->config['pk']];
    }
1032757
public function addChild(Node $child)
    {
        $this->children[]            = $child;
        $child->parent               = $this;
        $child->properties['parent'] = $this->getId();
    }
526677
public void addChildren(List<? extends Tree> kids) {
		for (int i = 0; i < kids.size(); i++) {
			Tree t = kids.get(i);
			addChild(t);
		}
	}
1335225
function addChild(child, node) {
    var children = node.children;
    if (child.parentNode === node) {
        return;
    }

    children.push(child);
    child.parentNode = node;
}
271382
public static <T extends HierarchyEntity<T, ?>> void addParent(Collection<T> nodes) {
    addParent(nodes, null);
  }
749455
public void addChild( LockedObject newChild ) {
        if (children == null) {
            children = new LockedObject[0];
        }
        int size = children.length;
        LockedObject[] newChildren = new LockedObject[size + 1];
        System.arraycopy(children, 0, newChildren, 0, size);
        newChildren[size] = newChild;
        children = newChildren;
    }
492144
public void addChildCluster(Cluster<M> parent, Cluster<M> child) {
    hierarchy.add(parent, child);
  }