39 lines
970 B
Java
39 lines
970 B
Java
package d0.z.d;
|
|
|
|
import d0.z.d.g0.a;
|
|
import java.util.Iterator;
|
|
import java.util.NoSuchElementException;
|
|
/* compiled from: ArrayIterator.kt */
|
|
public final class b<T> implements Iterator<T>, a {
|
|
public int i;
|
|
public final T[] j;
|
|
|
|
public b(T[] tArr) {
|
|
m.checkNotNullParameter(tArr, "array");
|
|
this.j = tArr;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return this.i < this.j.length;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public T next() {
|
|
try {
|
|
T[] tArr = this.j;
|
|
int i = this.i;
|
|
this.i = i + 1;
|
|
return tArr[i];
|
|
} catch (ArrayIndexOutOfBoundsException e) {
|
|
this.i--;
|
|
throw new NoSuchElementException(e.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public void remove() {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
}
|