@Override public void remove() { if (index == 0) { throw new IllegalStateException(); } index--; parent.removeChild(children.item(index)); size = children.getLength(); }
public ChildrenIterator(final Element parent) { this.parent = parent; this.children = parent.getChildren(); this.size = children.getLength(); this.index = 0; }