public override E remove(int location) { if (modCount == fullList.modCount) { if (0 <= location && location < sizeJ) { E result = fullList.remove(location + offset); sizeJ--; modCount = fullList.modCount; return(result); } throw new java.lang.IndexOutOfBoundsException(); } throw new ConcurrentModificationException(); }
public virtual void remove() { if (lastPosition == -1) { throw new java.lang.IllegalStateException(); } if (expectedModCount != outerInstance.modCount) { throw new ConcurrentModificationException(); } try { if (lastPosition == outerInstance.size() - numLeft) { numLeft--; // we're removing after a call to previous() } outerInstance.remove(lastPosition); } catch (java.lang.IndexOutOfBoundsException) { throw new ConcurrentModificationException(); } expectedModCount = outerInstance.modCount; lastPosition = -1; }