/** * Add new {@link BaseComponent} to this node. * * @param component new component to add. */ public void addExtra(final BaseComponent component) { if (this.extra == null) { this.extra = new ArrayList<>(5); } component.parent = this; this.extra.add(component); }
/** * Set list of extra/next elements appended after this one. * * @param components new list of extra/next elements. */ public void setExtra(final List<BaseComponent> components) { for (final BaseComponent component : components) { component.parent = this; } this.extra = new ArrayList<>(components); }