package e.s.c;

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

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

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

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

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

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

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

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