package d.n0.c;

import java.util.Iterator;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: ArrayIterator.kt */
/* JADX INFO: loaded from: classes.dex */
@d.n
final class b<T> implements Iterator<T> {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final T[] f2624c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private int f2625d;

    public b(T[] tArr) {
        s.e(tArr, "array");
        this.f2624c = tArr;
    }

    @Override // java.util.Iterator
    public boolean hasNext() {
        return this.f2625d < this.f2624c.length;
    }

    @Override // java.util.Iterator
    public T next() {
        try {
            T[] tArr = this.f2624c;
            int i = this.f2625d;
            this.f2625d = i + 1;
            return tArr[i];
        } catch (ArrayIndexOutOfBoundsException e2) {
            this.f2625d--;
            throw new NoSuchElementException(e2.getMessage());
        }
    }

    @Override // java.util.Iterator
    public void remove() {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }
}
