public void removeChild(DasMenuItem value) { if (getChilds().Contains(value)) { getChilds().Remove(value); value.setParent(null); } }
public void addChild(DasMenuItem value) { if (!getChilds().Contains(value)) { getChilds().Add(value); if (value.hasParent()) { value.getParent().removeChild(value); } value.setParent(this); } }