Returns a deep copy of this node's children. Changes made to these nodes will not be reflected in the original
nodes
@return a deep copy of this node's children
340900
public List<Node> childNodesCopy() {
        final List<Node> nodes = ensureChildNodes();
        final ArrayList<Node> children = new ArrayList<>(nodes.size());
        for (Node node : nodes) {
            children.add(node.clone());
        }
        return children;
    }
1332223
public Collection<CallTreeNode> getChildren() {
		return children == null ? Collections.<CallTreeNode>emptyList() : children.values();
	}
1137645
function() {
			if (!this.children.length)
				return null;
				
			var deepestChild = this;
			while (deepestChild.children.length) {
				deepestChild = deepestChild.children[deepestChild.children.length - 1];
			}
			
			return deepestChild;
		}
1204368
public Set<MigratingProcessElementInstance> getChildren() {
    Set<MigratingProcessElementInstance> childInstances = new HashSet<MigratingProcessElementInstance>();
    childInstances.addAll(childActivityInstances);
    childInstances.addAll(childTransitionInstances);
    childInstances.addAll(childCompensationInstances);
    childInstances.addAll(childCompensationSubscriptionInstances);
    return childInstances;
  }
267546
def branch(self):
        
        branch = [self]
        for c in self.children:
            branch += c.branch()
        return branch
359371
def copy(self):
        
        copied = TransformForest()
        copied.base_frame = copy.deepcopy(self.base_frame)
        copied.transforms = copy.deepcopy(self.transforms)

        return copied
19795
public List children() {
        if (value == null) {
            return new NodeList();
        }
        if (value instanceof List) {
            return (List) value;
        }
        // we're probably just a String
        List result = new NodeList();
        result.add(value);
        return result;
    }
624817
public List<Entity> getAllChildrenRecursive() {
        List<Entity> result = newArrayList();
        if (isRoot()) {
            allChildrenRecursive(this, result);
        }
        return result;
    }
968438
private List<SiteNode> getChildren(SiteNode siteNode) {
		int childCount = siteNode.getChildCount();
		if (childCount == 0) {
			return Collections.emptyList();
		}

		List<SiteNode> children = new ArrayList<>(childCount);
		for (int i = 0; i < childCount; i++) {
			children.add((SiteNode) siteNode.getChildAt(i));
		}
		return children;
	}
726864
def all_original_children(self):
        ''''''
        return chain.from_iterable(
            c.all_nodes_in_subtree()
            for lnk, c in self.children
            if lnk == self.LINK_CHILD)
1085876
public List<ChildData> getCurrentData()
    {
        return ImmutableList.copyOf(Sets.<ChildData>newTreeSet(currentData.values()));
    }
201327
@Override
	public Set<T> getAllChildNodes() {

		Set<T> allChildNodes = new HashSet();

		List<T> childNodes = treeGetChildren();

		for (final T child : childNodes) {

			allChildNodes.add(child);

			if (child instanceof LinkedTreeNode) {

				final LinkedTreeNode treeNode = (LinkedTreeNode)child;
				allChildNodes.addAll(treeNode.getAllChildNodes());
			}
		}

		return allChildNodes;
	}
886873
def deep_copy(item_original):
    """"""
    item = copy.copy(item_original)
    item._id = uuid.uuid4().hex
    if hasattr(item, '_children') and len(item._children) > 0:
        children_new = collections.OrderedDict()
        for subitem_original in item._children.values():
            subitem = deep_copy(subitem_original)
            subitem._parent = item
            children_new[subitem.get_name()] = subitem
        item._children = children_new
    return item
1114998
private Node deepCopy(final Node copyTarget){

        // Precondition checks
        assert copyTarget != null : "Node to copy information into must be specified";

        // Set attributes
        final Map<String, String> attributes = this.getAttributes();
        final Set<String> attributeKeys = attributes.keySet();
        for (final String key : attributeKeys) {
            final String value = attributes.get(key);
            copyTarget.attribute(key, value);
        }

        // Set text
        copyTarget.text(this.getText());

        // Set children
        final List<Node> children = this.getChildren();
        for (final Node child : children) {
            final Node newChild = copyTarget.createChild(child.getName());
            // Recurse in
            child.deepCopy(newChild);
        }

        // Return
        return this;
    }
1113313
public function duplicateWithChildren()
    {
        /** @var SiteTree $clone */
        $clone = $this->duplicate();
        $children = $this->AllChildren();

        if ($children) {
            /** @var SiteTree $child */
            $sort = 0;
            foreach ($children as $child) {
                $childClone = method_exists($child, 'duplicateWithChildren')
                    ? $child->duplicateWithChildren()
                    : $child->duplicate();
                $childClone->ParentID = $clone->ID;
                //retain sort order by manually setting sort values
                $childClone->Sort = ++$sort;
                $childClone->write();
            }
        }

        return $clone;
    }
1036553
public function removeChildren()
    {
        // we need to collect child nodes to array
        // because removing nodes from the DOMNodeList on iterating is not working
        $childNodes = [];

        foreach ($this->node->childNodes as $childNode) {
            $childNodes[] = $childNode;
        }

        $removedNodes = [];

        foreach ($childNodes as $childNode) {
            $removedNode = $this->node->removeChild($childNode);

            $removedNodes[] = new Element($removedNode);
        }

        return $removedNodes;
    }
9961
public final void detachChildren() {
    for (Node child = first; child != null;) {
      Node nextChild = child.next;
      child.parent = null;
      child.next = null;
      child.previous = null;
      child = nextChild;
    }
    first = null;
  }