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; } }
private XML getXML(XmlNode.InternalList _annos, int index) { if (index >= 0 && index < length()) { return xmlFromNode(_annos.item(index)); } else { return null; } }
@Override int length() { int result = 0; if (_annos != null) { result = _annos.length(); } return result; }
private void internalRemoveFromList(int index) { _annos.remove(index); }
void addToList(Object toAdd) { _annos.addToList(toAdd); }