public T setChildren(List<Element> children) { for (Element child : children) { child.parent = this; } this.children = children; return (T) this; }
public T addChild(Element element) { element.parent = this; ElementEventGenerator.triggerBeforeInsert(this, element); this.children.add(element); ElementHelper.reorderElements(this.children); ElementEventGenerator.triggerAfterInsert(this, element); return (T) this; }