public E Next() { if (expectedModCount != parent.modCount) { throw new ConcurrentModificationException(); } try { int index = parent.Size() - numLeft; E result = parent.Get(index); lastPosition = index; numLeft--; return(result); } catch (IndexOutOfRangeException) { throw new NoSuchElementException(); } }
public SimpleListIterator(AbstractList <E> parent) : base() { this.parent = parent; this.numLeft = parent.Size(); this.expectedModCount = parent.modCount; }