Exemplo n.º 1
0
 @Override
 public void remove() {
   if (index == 0) {
     throw new IllegalStateException();
   }
   index--;
   parent.removeChild(children.item(index));
   size = children.getLength();
 }
Exemplo n.º 2
0
 @Override
 public Element next() {
   if (!hasNext()) {
     throw new NoSuchElementException();
   }
   Element child = (Element) children.item(index);
   index++;
   return child;
 }
Exemplo n.º 3
0
 public ChildrenIterator(final Element parent) {
   this.parent = parent;
   this.children = parent.getChildren();
   this.size = children.getLength();
   this.index = 0;
 }