Add child to children of this TreeItem

        :param child: the child TreeItem
        :type child: :class:`TreeItem`
        :returns: None
        :rtype: None
        :raises: None
340106
def add_child(self, child):
        
        child.set_model(self._model)
        if self._model:
            row = len(self.childItems)
            parentindex = self._model.index_of_item(self)
            self._model.insertRow(row, child, parentindex)
        else:
            self.childItems.append(child)
859746
def add(self, child):
        

        if isinstance(child, Include):
            self.add_include(child)
        elif isinstance(child, Dimension):
            self.add_dimension(child)
        elif isinstance(child, Unit):
            self.add_unit(child)
        elif isinstance(child, ComponentType):
            self.add_component_type(child)
        elif isinstance(child, Component):
            self.add_component(child)
        elif isinstance(child, FatComponent):
            self.add_fat_component(child)
        elif isinstance(child, Constant):
            self.add_constant(child)
        else:
            raise ModelError('Unsupported child element')
334778
public XNElement add(XNElement child) {
        child.parent = this;
        children.add(child);
        return child;
    }
604625
def child_added(self, child):
        
        super(UiKitView, self).child_added(child)

        widget = self.widget
        #: TODO: Should index be cached?
        for i, child_widget in enumerate(self.child_widgets()):
            if child_widget == child.widget:
                widget.insertSubview(child_widget, atIndex=i)
885679
def add_child(self, **kwargs):
        """"""
        cls = get_result_class(self.__class__)

        if len(kwargs) == 1 and 'instance' in kwargs:
            # adding the passed (unsaved) instance to the tree
            newobj = kwargs['instance']
            if newobj.pk:
                raise NodeAlreadySaved("Attempted to add a tree node that is "\
                    "already in the database")
        else:
            newobj = cls(**kwargs)

        try:
            newobj._cached_depth = self._cached_depth + 1
        except AttributeError:
            pass
        if not cls.node_order_by:
            try:
                max = cls.objects.filter(parent=self).reverse(
                )[0].sib_order
            except IndexError:
                max = 0
            newobj.sib_order = max + 1
        newobj.parent = self
        newobj.save()
        return newobj
1257437
def insert_tree(self, items, node, headers):
        
        first = items[0]
        child = node.get_child(first)
        if child is not None:
            child.count += 1
        else:
            # Add new child.
            child = node.add_child(first)

            # Link it to header structure.
            if headers[first] is None:
                headers[first] = child
            else:
                current = headers[first]
                while current.link is not None:
                    current = current.link
                current.link = child

        # Call function recursively.
        remaining_items = items[1:]
        if len(remaining_items) > 0:
            self.insert_tree(remaining_items, child, headers)
278880
def _add_member(self, member):
        
        if member.id in self.children:
            return None
        else:
            self.children[member.id] = member
241523
public final int addChild (Task<E> child) {
		int index = addChildToTask(child);
		if (tree != null && tree.listeners != null) tree.notifyChildAdded(this, index);
		return index;
	}
291448
def add_child(self, item):
        """"""
        item.depth = self.depth + 1
        self.childs.append(item)
        self.childs = sorted(self.childs, key=lambda item: item.order if item.order else 999)
364137
def add_to(self, parent, name=None, index=None):
        """"""
        parent.add_child(self, name=name, index=index)
        return self
1217673
def add_children(self, *children, **kwargs):
        """"""
        for child in children:
            self.add_child(child, **kwargs)
799308
public function addChild($child)
    {
        if ($child instanceof SwatDataTreeNode) {
            $child = self::convertFromDataTree($child);
        }

        parent::addChild($child);
    }
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)
                )
934752
def remove_child(self, child):
        
        try:
            self._children.remove(child)
        except ValueError:  # Child may not be in list
            pass
        else:
            child.parent = None
232171
def addChildren(self, child_ids):
        

        if not hasattr(child_ids, "__iter__"):
            error_msg = "Input parameter 'child_ids' is not iterable"
            self.log.error(error_msg)
            raise exception.BadValue(error_msg)

        self.log.debug("Try to add children <Workitem %s> to current "
                       "<Workitem %s>",
                       child_ids,
                       self)
        self._addChildren(child_ids)
        self.log.info("Successfully add children <Workitem %s> to current "
                      "<Workitem %s>",
                      child_ids,
                      self)
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);
    }
1350470
public void addChild(C child) {
        SharedPreferences prefs = loadSharedPreferences("children");

        List<String> objects = getChildrenList();

        Model toPut = (Model) child;

        if (objects.indexOf(toPut.getId()) != ArrayUtils.INDEX_NOT_FOUND) {
            return;
        }

        objects.add(toPut.getId());

        toPut.save();

        prefs.edit().putString(String.valueOf(getId()), StringUtils.join(objects, ",")).commit();
    }