Adds a child to this node's content. A child may be a TextNode, or another ElementNode... or anything else
that may extend the abstract Node class.

@param child the node to add as a child
19033
public function addChild(Node $child) {
        array_push($this->children, $child);
        $child->setParent( $this );
    }
594414
public function addChildren($child) : void
    {
        Assert::isInstanceOfAny($child, [EntityDescriptor::class, EntitiesDescriptor::class]);
        $this->children[] = $child;
    }
513578
public final void addChildBefore(Node newChild, Node node) {
    checkArgument(node.parent == this, "The existing child node of the parent should not be null.");
    checkArgument(newChild.next == null, "The new child node has next siblings.");
    checkArgument(newChild.previous == null, "The new child node has previous siblings.");
    checkArgument(newChild.parent == null, "The new child node already has a parent.");
    if (first == node) {
      Node last = first.previous;
      // NOTE: last.next remains null
      newChild.parent = this;
      newChild.next = first;
      newChild.previous = last;
      first.previous = newChild;
      first = newChild;
    } else {
      addChildAfter(newChild, node.previous);
    }
  }
1097466
def add_child(self, child):
        
        if not isinstance(child, DependencyNode):
            raise TypeError('"child" must be a DependencyNode')
        self._children.append(child)
326169
public function addChild(Form_ElementModel $child)
	{
		if(!$this->allowChildren)
		{
			throw new Exception(__CLASS__." doesn't support children");
		}
		$this->children[] = $child;
	}
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);
	}
93860
@Override
	public void removeChild(final ITreeNode<T> child)
	{
		if (children != null)
		{
			children.remove(child);
		}
		else
		{
			children = new ArrayList<>();
		}

	}
1038360
public function addChild(self $child)
    {
        if (!is_array($this->children)) {
            $this->children = [];
        }

        $this->children[] = $child;
    }
814676
def add_child(self, child):
        
        if child.tag in self.contained_children:
            self.children.append(child)
        else:
            raise UNTLStructureException(
                'Invalid child "%s" for parent "%s"' % (
                    child.tag,
                    self.tag
                )
            )
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));
    }
1014590
public static <T extends MutableTreeNode<T>> void removeChild(T parent, T child) {
        checkArgNotNull(parent, "parent");
        int index = parent.getChildren().indexOf(child);
        checkElementIndex(index, parent.getChildren().size());
        parent.removeChild(index);
    }
1323658
@Override
	public void addChild(final ITreeNode<T> child)
	{
		if (children != null)
		{
			children.add(child);
		}
		else
		{
			children = new ArrayList<>();
			children.add(child);
		}

	}
799132
public function addChild(Node $child)
    {
        $this->children[]                           = $child;
        $child->parent                              = $this;
        $child->properties[$this->config['parent']] = $this->properties[$this->config['pk']];
    }
127208
def add_child(self, node):
        """"""
        node._parent = self
        self._children.append(node)
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
1011482
public function addChild($child)
    {
        if ($child == null) return;
        $child->onAddChild($this);
        $this->child_list[$child->core_name] = $child;
    }
871788
public synchronized boolean addChild(String child) {
        if (children == null) {
            // let's be conservative on the typical number of children
            children = new HashSet<String>(8);
        }
        return children.add(child);
    }