/* * Decompiled with CFR 0.152. */ package com.tridium.util; import java.util.ListIterator; import java.util.NoSuchElementException; /* * Illegal identifiers - consider using --renameillegalidents true */ public class ArrayIterator implements ListIterator { private Object[] array; private int first; private int size; private int carat; public void add(Object object) { throw new UnsupportedOperationException(); } public boolean hasNext() { boolean bl = false; if (this.carat < this.first + this.size) { bl = true; } return bl; } public boolean hasPrevious() { boolean bl = false; if (this.carat > this.first) { bl = true; } return bl; } public Object next() throws NoSuchElementException { if (!this.hasNext()) { throw new NoSuchElementException(); } return this.array[this.carat++]; } public int nextIndex() { return this.carat - this.first; } public Object previous() throws NoSuchElementException { if (!this.hasPrevious()) { throw new NoSuchElementException(); } return this.array[--this.carat]; } public int previousIndex() { if (this.carat == this.first) { return -1; } return Math.min(this.first + this.size - 1, this.carat - this.first - 1); } public void remove() { throw new UnsupportedOperationException(); } public void set(Object object) { throw new UnsupportedOperationException(); } private final /* synthetic */ void this() { this.first = 0; this.size = 0; this.carat = 0; } public ArrayIterator(Object[] objectArray) { this(objectArray, 0, objectArray.length); } public ArrayIterator(Object[] objectArray, int n, int n2) { this.this(); if (objectArray == null) { throw new NullPointerException(); } if (n < 0 || n2 > objectArray.length) { throw new IllegalArgumentException(); } this.array = objectArray; this.first = n; this.size = n2; this.carat = n; } }