public MAGComponentInterface[] getNamedChildren() { if (_childrenhash == null) { scanNamedChildren(); } MAGComponentInterface[] siblings = new MAGComponentInterface[_childrenhash.size()]; int sibling_idx = 0; for (int i = 0; i < _children.size(); i++) { MAGComponentInterface tmp = getChild(i); if (tmp.id() != null && tmp.id().length() > 0) { if (tmp == _childrenhash.get(tmp.id())) { siblings[sibling_idx] = tmp; sibling_idx++; } } } return siblings; }
public void removeChild(MAGComponentInterface child) { if (child.id() != null && child.id().length() > 0 && _childrenhash != null) { _childrenhash.remove(child.id()); } _children.removeElement(child); }