package e.s.c;

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

/* JADX INFO: loaded from: classes.dex */
public final class a<T> implements Iterator<T>, e.s.c.t.a {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f5996b;

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

    public a(T[] tArr) {
        i.e(tArr, "array");
        this.f5997c = tArr;
    }

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

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

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