Public function.
Set the child array after filtering
@param children {Array} Array of DataNodes to be set
424289
function (children) {
        var allChildren = this.get('allChildren');
        if(allChildren) {
          this._setChildren(allChildren.filter(function (child) {
            return children.indexOf(child) !== -1; // true if child is in children
          }));
        }
      }
1241490
public function setChildren(array $children)
    {

        $this->removeChildren();
        foreach ($children as $child)
            $this->appendChild($child);

        return $this;
    }
638121
public void setChildren(List<CmsGalleryTreeEntry> children) {

        m_children = children;
        for (CmsGalleryTreeEntry child : m_children) {
            child.setParent(this);
        }
    }
1049827
function (childrenToRemove) {
        var children = this.get('children');
        if(children) {
          children = children.filter(function (child) {
            return childrenToRemove.indexOf(child) === -1; // false if child is in children
          });
          this._setChildren(children);
        }
      }
1286338
function forEach(children, func) {
  let index = 0;
  React.Children.forEach(children, child => {
    if (React.isValidElement(child)) func(child, index++);
  });
}
498098
def set_children(self, children):
        """"""
        if isinstance(children, tuple):
            self._children = list(children)
        else:
            self._children = [children]
        return self
978576
public void connect(List<Tree> children) {
        this.children = children;
        for (Tree t : children)
            t.setParent(this);
    }
590127
public static void setParents(Parse p) {
    Parse[] children = p.getChildren();
    for (int ci = 0; ci < children.length; ci++) {
      children[ci].setParent(p);
      setParents(children[ci]);
    }
  }
1307347
@Override
	public boolean setChildAt(int index, N newChild) throws IndexOutOfBoundsException {
		final N oldChild = (index < this.children.length) ? this.children[index] : null;
		if (oldChild == newChild) {
			return false;
		}

		if (oldChild != null) {
			oldChild.setParentNodeReference(null, true);
			--this.notNullChildCount;
			firePropertyChildRemoved(index, oldChild);
		}

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

		// set the element
		this.children[index] = newChild;

		if (newChild != null) {
			newChild.setParentNodeReference(toN(), true);
			++this.notNullChildCount;
			firePropertyChildAdded(index, newChild);
		}

		return true;
	}
130655
public void addChildren(int index, List<? extends N> children) {
    List<N> origChildren = Lists.newArrayList(this.children);
    int origNumChildren = this.children.size();
    // Temporarily remove the original children from index onward (in reverse order).
    for (int i = origNumChildren - 1; i >= index; i--) {
      removeChild(i);
    }
    // Add the new children.
    addChildren(children);
    // Add back the original children that we temporarily removed (in correct order).
    addChildren(origChildren.subList(index, origNumChildren));
  }
235888
function sortChildren(parent, sortingFunction) {
  if (!parent.children) return;
  parent.children = new Map([...parent.children.entries()].sort(sortingFunction));
  for (var i = 0; i < parent.children.length; ++i)
    recalculateSiblings(parent.children[i], i);
  for (var child of parent.children.values())
    sortChildren(child, sortingFunction);
}
764923
function _gpfWebTagFlattenChildren (array, callback) {
    array.forEach(function (item) {
        if (_gpfIsArray(item)) {
            _gpfWebTagFlattenChildren(item, callback);
        } else {
            callback(item);
        }
    });
}
764074
function addChildren(node) {
    var children = node._private.children;

    for (var i = 0; i < children.length; i++) {
      add(children[i]);
    }
  }
192507
function(children) {
			_assert(
				children && (!this.children || this.children.length === 0),
				"only init supported"
			);
			this.children = [];
			for (var i = 0, l = children.length; i < l; i++) {
				this.children.push(new FancytreeNode(this, children[i]));
			}
		}
557107
def set_children(self, value, defined):
        """"""
        self.children = value
        self.children_defined = defined
        return self
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;
  }
235639
function(node, children, lpad) {
    var childLpad = lpad + 2;
    
    for (var i=0; i < children.length; i++) {
      var child = children[i];
      if (child instanceof Array) {
        var nestedChildren = child;
        this.renderChildren(node, nestedChildren, lpad)
      } else {
        node.push(child.render(childLpad));
      }
    }    
  }