Add the given existing child to this element.
@param child the child element
@return the child element
334778
public XNElement add(XNElement child) {
        child.parent = this;
        children.add(child);
        return child;
    }
116038
def add_child(self, child):
        

        if isinstance(child, Comment):
            return

        # ignore Text nodes with whitespace-only content
        if isinstance(child, Text) and not child.text.strip():
            return

        super(Extends, self).add_child(child)
704648
@SuppressWarnings({"unchecked"})
	public L add(N newChild, Kind newChildKind) {
		getAst().setChanged();
		L n = getAst().buildTree(newChild, newChildKind);
		if (n == null) return null;
		n.parent = (L) this;
		children = children.append(n);
		return n;
	}
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));
    }
730171
def add_child(self, child, name=None, index=None):
        """"""
        self.m1.add_child(child, name, index)
        if index is None:
            index = len(self.m2._children)
        self.children_for_m2.append((child, name, index))
1180656
def append_child(self, child):
        
        child.parent = self
        self.children.append(child)
        self.changed()
1087157
public void addChild(final RuleConditionElement child) {
        if ( (this.isNot() || this.isExists()) && (this.children.size() > 0) ) {
            throw new RuntimeException( this.type.toString() + " can have only a single child element. Either a single Pattern or another CE." );
        }
        this.children.add( child );
    }
52774
def add(self, child):
        

        if isinstance(child, Action):
            self.add_action(child)
        else:
            raise ModelError('Unsupported child element')
1067786
protected void add(Widget child, Element container) {

        // Detach new child.
        child.removeFromParent();

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

        // Physical attach.
        DOM.appendChild(container, child.getElement());

        // Adopt.
        adopt(child);
    }
1124682
def add(self, child):
        

        if isinstance(child, With):
            self.add_with(child)
        elif isinstance(child, EventConnection):
            self.add_event_connection(child)
        elif isinstance(child, ChildInstance):
            self.add_child_instance(child)
        elif isinstance(child, MultiInstantiate):
            self.add_multi_instantiate(child)
        elif isinstance(child, ForEach):
            self.add_for_each(child)
        else:
            raise ModelError('Unsupported child element')
542493
public void appendChild(final Node child) {
        if (child instanceof Level) {
            // Append the level
            levels.add((Level) child);
            nodes.add(child);
            if (child.getParent() != null) {
                child.removeParent();
            }
            child.setParent(this);
        } else if (child instanceof SpecTopic) {
            appendSpecTopic((SpecTopic) child);
        } else if (child instanceof CommonContent) {
            // Append the common content
            commonContents.add((CommonContent) child);
            nodes.add(child);
            if (child.getParent() != null) {
                child.removeParent();
            }
            child.setParent(this);
        } else {
            nodes.add(child);
            if (child.getParent() != null) {
                child.removeParent();
            }
            child.setParent(this);
        }
    }
258074
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;
    }
664112
def add_child(self, child):
        
        if isinstance(child, BaseCitation):
            self._children.append(child)
567592
public void addChild(TreeElement child)
            throws IllegalArgumentException
    {

        TreeElement theChild = child;
        theChild.setParent(this);
        if (getName() == null) {
            setName("0");
        }
        if (_children == null) {
            _children = new ArrayList();
        }
        //int n = _children.size();
        //if (n > 0) {
        //    TreeElement node = (TreeElement) _children.get(n - 1);
        //    node.setLast(false);
        //}
        //theChild.setLast(true);
        _children.add(child);
        int n = _children.size();
        theChild.updateName(this, n - 1);
    }
742943
function addChild(&$child)
    {
        /* Make sure this is a Log instance. */
        if (!is_a($child, 'Log')) {
            return false;
        }

        $this->_children[$child->_id] = $child;

        return true;
    }
1213495
def add_child(self, child):
        
        # Make sure the child exists before adding it.
        if child:
            # Append child if it is allowed to exist under the parent.
            if child.tag in self.contained_children:
                self.children.append(child)
            else:
                raise DC_StructureException(
                    'Invalid child "%s" for parent "%s"' %
                    (child.tag, self.tag)
                )
364137
def add_to(self, parent, name=None, index=None):
        """"""
        parent.add_child(self, name=name, index=index)
        return self