Beispiel #1
0
 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;
   }
 }
Beispiel #2
0
 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;
   }
 }
Beispiel #3
0
 private XML getXML(XmlNode.InternalList _annos, int index) {
   if (index >= 0 && index < length()) {
     return xmlFromNode(_annos.item(index));
   } else {
     return null;
   }
 }
Beispiel #4
0
  @Override
  int length() {
    int result = 0;

    if (_annos != null) {
      result = _annos.length();
    }

    return result;
  }
Beispiel #5
0
 private void internalRemoveFromList(int index) {
   _annos.remove(index);
 }
Beispiel #6
0
 void addToList(Object toAdd) {
   _annos.addToList(toAdd);
 }