private void insert(int index, XML xml) { if (index < length()) { XmlNode.InternalList newAnnoList = new XmlNode.InternalList(); newAnnoList.add(_annos, 0, index); newAnnoList.add(xml); newAnnoList.add(_annos, index, length()); _annos = newAnnoList; } }
void replace(int index, XML xml) { if (index < length()) { XmlNode.InternalList newAnnoList = new XmlNode.InternalList(); newAnnoList.add(_annos, 0, index); newAnnoList.add(xml); newAnnoList.add(_annos, index + 1, length()); _annos = newAnnoList; } }