home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- class AbstractList$ListItr extends AbstractList.Itr implements ListIterator {
- // $FF: synthetic field
- private final AbstractList this$0;
-
- AbstractList$ListItr(AbstractList var1, int var2) {
- super(var1, (AbstractList.1)null);
- this.this$0 = var1;
- super.cursor = var2;
- }
-
- public boolean hasPrevious() {
- return super.cursor != 0;
- }
-
- public Object previous() {
- try {
- Object var1 = this.this$0.get(--super.cursor);
- ((AbstractList.Itr)this).checkForComodification();
- super.lastRet = super.cursor;
- return var1;
- } catch (IndexOutOfBoundsException var2) {
- ((AbstractList.Itr)this).checkForComodification();
- throw new NoSuchElementException();
- }
- }
-
- public int nextIndex() {
- return super.cursor;
- }
-
- public int previousIndex() {
- return super.cursor - 1;
- }
-
- public void set(Object var1) {
- if (super.lastRet == -1) {
- throw new IllegalStateException();
- } else {
- ((AbstractList.Itr)this).checkForComodification();
-
- try {
- this.this$0.set(super.lastRet, var1);
- super.expectedModCount = this.this$0.modCount;
- } catch (IndexOutOfBoundsException var3) {
- throw new ConcurrentModificationException();
- }
- }
- }
-
- public void add(Object var1) {
- ((AbstractList.Itr)this).checkForComodification();
-
- try {
- this.this$0.add(super.cursor++, var1);
- super.lastRet = -1;
- super.expectedModCount = this.this$0.modCount;
- } catch (IndexOutOfBoundsException var3) {
- throw new ConcurrentModificationException();
- }
- }
- }
-