for (int index = 0; index < length; ++index) children.removeElementAt(offset);  for (int index = 0; index < elems.length; ++index) children.add(offset + index, elems[index]);
Element[] target = new Element[children.length - length + elements.length]; System.arraycopy(children, 0, target, 0, offset); System.arraycopy(elements, 0, target, offset, elements.length); System.arraycopy(children, offset + length, target, offset + elements.length, children.length - offset - length); children = target;
    public void replace(int offset, int length, Element[] elems)    {      for (int index = 0; index < length; ++index)	children.removeElementAt(offset);      for (int index = 0; index < elems.length; ++index)	children.add(offset + index, elems[index]);    }