home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- class AbstractList$Itr implements Iterator {
- int cursor;
- int lastRet;
- int expectedModCount;
- // $FF: synthetic field
- private final AbstractList this$0;
-
- private AbstractList$Itr(AbstractList var1) {
- this.this$0 = var1;
- this.cursor = 0;
- this.lastRet = -1;
- this.expectedModCount = this.this$0.modCount;
- }
-
- public boolean hasNext() {
- return this.cursor != this.this$0.size();
- }
-
- public Object next() {
- try {
- Object var1 = this.this$0.get(this.cursor);
- this.checkForComodification();
- this.lastRet = this.cursor++;
- return var1;
- } catch (IndexOutOfBoundsException var2) {
- this.checkForComodification();
- throw new NoSuchElementException();
- }
- }
-
- public void remove() {
- if (this.lastRet == -1) {
- throw new IllegalStateException();
- } else {
- this.checkForComodification();
-
- try {
- this.this$0.remove(this.lastRet);
- if (this.lastRet < this.cursor) {
- --this.cursor;
- }
-
- this.lastRet = -1;
- this.expectedModCount = this.this$0.modCount;
- } catch (IndexOutOfBoundsException var2) {
- throw new ConcurrentModificationException();
- }
- }
- }
-
- final void checkForComodification() {
- if (this.this$0.modCount != this.expectedModCount) {
- throw new ConcurrentModificationException();
- }
- }
-
- // $FF: synthetic method
- AbstractList$Itr(AbstractList var1, AbstractList.1 var2) {
- this(var1);
- }
- }
-