Add a node child node to this element.

@param child node to add.
@return this element, so that you can add more child nodes or elements.
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;
    }
469168
public void addLastChild( AstNode child ) {
        assert child != null;
        this.children.addLast(child);
        child.removeFromParent();
        child.parent = this;
    }
623599
public void addAndLinkChild(AbstractPlanNode child) {
        assert(child != null);
        m_children.add(child);
        child.m_parents.add(this);
    }
114132
protected void addChild(Node child, int index, double split) {
        children.add(index, child);
        nodeSplits.put(child, split);
        child.setParent(this);
    }
1097466
def add_child(self, child):
        
        if not isinstance(child, DependencyNode):
            raise TypeError('"child" must be a DependencyNode')
        self._children.append(child)
1111565
public CallTreeNode addChild(String name) {
		if (children == null) {
			children = new HashMap<>();
		}
		CallTreeNode child = new CallTreeNode(name);
		children.put(name, child);
		child.parent = this;
		return child;
	}
962703
public static <T extends MutableTreeNode<T>> void addChild(T parent, T child) {
        checkArgNotNull(parent, "parent");
        parent.addChild(parent.getChildren().size(), child);
    }
699349
public Node appendChild(Node newChild) throws DOMException
  {

    error(XSLTErrorResources.ER_CANNOT_ADD,
          new Object[]{ newChild.getNodeName(),
                        this.getNodeName() });  //"Can not add " +((ElemTemplateElement)newChild).m_elemName +

    //" to " + this.m_elemName);
    return null;
  }
906814
def add_child(self, child):
        
        child_id = getattr(child, 'id', None)
        if child_id:
            if not hasattr(self, 'children'):
                self.children = {}
            if child_id not in self.children:
                self.children[child_id] = child
516632
public static void addChildResult(HierarchicalResult parent, Result child) {
    parent.getHierarchy().add(parent, child);
  }
241317
public boolean hasChild(String child)
    {
        final NodeList list = root.getChildNodes();
        for (int i = 0; i < list.getLength(); i++)
        {
            final Node node = list.item(i);
            if (node.getNodeName().equals(child))
            {
                return true;
            }
        }
        return false;
    }
1033377
public void addChild(ViewNode child) throws IllegalArgumentException {
		tree.addNode(child);
		child.setParent(this);
		this.leaf = false; // 一旦增加子节点，该节点就不是叶了。
		int n = children.size();
		if (n > 0) {
			ViewNode node = (ViewNode) children.get(n - 1);
			node.setLast(false);
		}
		child.setLast(true);
		children.add(child);
	}
1370958
public void add(DepTreeNode child) {
		if (children == null) {
			children = new HashMap<String, DepTreeNode>();
		}
		children.put(child.getName(), child);
		child.setParent(this);
	}
1014112
public void addChildAfter(Node newChild, Node node) {
        if (newChild.next != null)
            throw new RuntimeException(
                      "newChild had siblings in addChildAfter");
        newChild.next = node.next;
        node.next = newChild;
        if (last == node)
            last = newChild;
    }
1164705
def add_child(self, child):
        '''
        '''
        if not isinstance(child, Node):
            raise TypeError("child must be a Node")
        self.children.append(child); child.parent = self
538671
public void addChild(final DiffNode node)
	{
		if (node == this)
		{
			throw new IllegalArgumentException("Detected attempt to add a node to itself. " +
					"This would cause inifite loops and must never happen.");
		}
		else if (node.isRootNode())
		{
			throw new IllegalArgumentException("Detected attempt to add root node as child. " +
					"This is not allowed and must be a mistake.");
		}
		else if (node.getParentNode() != null && node.getParentNode() != this)
		{
			throw new IllegalArgumentException("Detected attempt to add child node that is already the " +
					"child of another node. Adding nodes multiple times is not allowed, since it could " +
					"cause infinite loops.");
		}
		if (node.getParentNode() == null)
		{
			node.setParentNode(this);
		}
		children.put(node.getElementSelector(), node);
		if (state == State.UNTOUCHED && node.hasChanges())
		{
			state = State.CHANGED;
		}
	}
1074436
public void addChild(N child) {
    checkNotNull(child);
    tryRemoveFromOldParent(child);
    children.add(child);
    child.setParent(master);
  }