package o;

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

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.i9, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1460i9 implements Iterator, InterfaceC2989yJ {
    public int l;
    public int m;
    public boolean n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ int f577o;
    public final /* synthetic */ Object p;

    public C1460i9(int i) {
        this.l = i;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        return this.m < this.l;
    }

    @Override // java.util.Iterator
    public final Object next() {
        Object objF;
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        int i = this.m;
        switch (this.f577o) {
            case 0:
                objF = ((C1839m9) this.p).f(i);
                break;
            case 1:
                objF = ((C1839m9) this.p).i(i);
                break;
            default:
                objF = ((C2124p9) this.p).m[i];
                break;
        }
        this.m++;
        this.n = true;
        return objF;
    }

    @Override // java.util.Iterator
    public final void remove() {
        if (!this.n) {
            throw new IllegalStateException("Call next() before removing an element.");
        }
        int i = this.m - 1;
        this.m = i;
        switch (this.f577o) {
            case 0:
                ((C1839m9) this.p).g(i);
                break;
            case 1:
                ((C1839m9) this.p).g(i);
                break;
            default:
                ((C2124p9) this.p).a(i);
                break;
        }
        this.l--;
        this.n = false;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C1460i9(C2124p9 c2124p9) {
        this(c2124p9.n);
        this.f577o = 2;
        this.p = c2124p9;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C1460i9(C1839m9 c1839m9, int i) {
        this(c1839m9.n);
        this.f577o = i;
        switch (i) {
            case 1:
                this.p = c1839m9;
                this(c1839m9.n);
                break;
            default:
                this.p = c1839m9;
                break;
        }
    }
}
