Add a new child node at the specified position in the child list.
@param offset Zero-relative offset at which the new node
should be inserted
@param child  The new child node
@throws IllegalArgumentException if the name of the new child
node is not unique
18595
public void addChild(int offset, TreeElement child)
            throws IllegalArgumentException
    {
        child.setSelected(false);
        child.setParent(this);
        if (_children == null)
            _children = new ArrayList();
        _children.add(offset, child);

        //Need to rename all affected!
        int size = _children.size();
        for (int i = offset; i < size; i++) {
            TreeElement thisChild = (TreeElement) _children.get(i);
            thisChild.updateName(this, i);
        }

    }
302691
public void addChild(CmsGalleryTreeEntry child) {

        if (m_children == null) {
            m_children = new ArrayList<CmsGalleryTreeEntry>();
        }
        m_children.add(child);
        child.setParent(this);
    }
108854
protected int add_child(int idx, IonValueLite child)
    {
        _isNullValue(false); // if we add children we're not null anymore
        child.setContext(this.getContextForIndex(child, idx));
        if (_children == null || _child_count >= _children.length) {
            int old_len = (_children == null) ? 0 : _children.length;
            int new_len = this.nextSize(old_len, true);
            assert(new_len > idx);
            IonValueLite[] temp = new IonValueLite[new_len];
            if (old_len > 0) {
                System.arraycopy(_children, 0, temp, 0, old_len);
            }
            _children = temp;
        }
        if (idx < _child_count) {
            System.arraycopy(_children, idx, _children, idx+1, _child_count-idx);
        }
        _child_count++;
        _children[idx] = child;
        structuralModificationCount++;

        child._elementid(idx);

        if (!_isSymbolIdPresent() && child._isSymbolIdPresent())
        {
            cascadeSIDPresentToContextRoot();
        }

        return idx;
    }
19033
public function addChild(Node $child) {
        array_push($this->children, $child);
        $child->setParent( $this );
    }
1004542
public final boolean addChild(int index, N newChild) {
		if (newChild == null) {
			return false;
		}

		final int count = (this.children == null) ? 0 : this.children.size();

		final N oldParent = newChild.getParentNode();
		if (oldParent != this && oldParent != null) {
			newChild.removeFromParent();
		}

		final int insertionIndex;

		if (this.children == null) {
			this.children = newInternalList(index + 1);
		}

		if (index < count) {
			// set the element
			insertionIndex = Math.max(index, 0);
			this.children.add(insertionIndex, newChild);
		} else {
			// Resize the array
			insertionIndex = this.children.size();
			this.children.add(newChild);
		}

		++this.notNullChildCount;

		newChild.setParentNodeReference(toN(), true);
		firePropertyChildAdded(insertionIndex, newChild);

		return true;
	}
1365493
def add(self, child, name=None, coordinates=None):
        
        if not name:
            name = str(child)

        if name in self.children_by_name:
            raise RuntimeWarning(
                'Child with name {} already in slot, use custom name'.format(
                    name))

        if coordinates:
            child._coordinates = Vector(coordinates)
        child.parent = self
        self.children_by_name[name] = child
        self.children_by_reference[child] = name
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);
	}
487797
public final void addChildAfter(Node newChild, @Nullable Node node) {
    checkArgument(newChild.next == null, "The new child node has next siblings.");
    checkArgument(newChild.previous == null, "The new child node has previous siblings.");
    // NOTE: newChild.next remains null
    newChild.previous = newChild;
    addChildrenAfter(newChild, node);
  }
1011482
public function addChild($child)
    {
        if ($child == null) return;
        $child->onAddChild($this);
        $this->child_list[$child->core_name] = $child;
    }
499218
function appendChild(&$child) {
             
            // Set child's parentNode
            $child->parentNode = & $this;
             
            // Add child to list of childNodes
            $this->childNodes[] = & $child;
             
            // Is child of type node?
            if ($child->nodeType == XML_TYPE_NODE) {
                 
                // Set child's previousSibling
                $child->previousSibling = & $this->lastChild;
            }
             
            // Is this node of type node?
            if ($this->nodeType != null && $this->nodeType == XML_TYPE_NODE) {
                 
                // Set current lastChild's nextSibling to this child
                if (!is_null($this->lastChild)) {
                    $this->lastChild->nextSibling = & $child;
                }
                 
                // Now (re)set firstChild and lastChild
                $this->firstChild = & $this->childNodes[0];
                $this->lastChild = & $child;
            }
             
        }
1032757
public function addChild(Node $child)
    {
        $this->children[]            = $child;
        $child->parent               = $this;
        $child->properties['parent'] = $this->getId();
    }
188907
public void insertChild(int i, Object t) {
		if (i < 0 || i > getChildCount()) {
			throw new IndexOutOfBoundsException(i+" out or range");
		}

		if (children == null) {
			children = createChildrenList();
		}

		children.add(i, t);
		// walk others to increment their child indexes
		// set index, parent of this one too
		this.freshenParentAndChildIndexes(i);
	}
334778
public XNElement add(XNElement child) {
        child.parent = this;
        children.add(child);
        return child;
    }
35236
private boolean add(ClusteringFeature[] children, ClusteringFeature child) {
    for(int i = 0; i < children.length; i++) {
      if(children[i] == null) {
        children[i] = child;
        return true;
      }
    }
    return false;
  }
1130446
public void insert(final Widget child, final int beforeIndex) {
        insert(child, (Element) getElement(), beforeIndex, true);
    }
1074436
public void addChild(N child) {
    checkNotNull(child);
    tryRemoveFromOldParent(child);
    children.add(child);
    child.setParent(master);
  }
230091
protected void addLogical(Widget child) {
		// Detach new child.
		child.removeFromParent();

		// Logical attach.
		getChildren().add(child);

		// Adopt.
		adopt(child);
	}