package q;

import java.util.Iterator;
import java.util.NoSuchElementException;
import n4.u0;

/* JADX INFO: renamed from: q.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1440a implements Iterator, Q6.a {

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

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

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public boolean f16167s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final /* synthetic */ int f16168t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final /* synthetic */ Object f16169u;

    public C1440a(int i) {
        this.f16165q = i;
    }

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

    @Override // java.util.Iterator
    public final Object next() {
        Object objE;
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        int i = this.f16166r;
        switch (this.f16168t) {
            case u0.f15495q /* 0 */:
                objE = ((e) this.f16169u).e(i);
                break;
            case 1:
                objE = ((e) this.f16169u).h(i);
                break;
            default:
                objE = ((f) this.f16169u).f16180r[i];
                break;
        }
        this.f16166r++;
        this.f16167s = true;
        return objE;
    }

    @Override // java.util.Iterator
    public final void remove() {
        if (!this.f16167s) {
            throw new IllegalStateException("Call next() before removing an element.");
        }
        int i = this.f16166r - 1;
        this.f16166r = i;
        switch (this.f16168t) {
            case u0.f15495q /* 0 */:
                ((e) this.f16169u).f(i);
                break;
            case 1:
                ((e) this.f16169u).f(i);
                break;
            default:
                ((f) this.f16169u).a(i);
                break;
        }
        this.f16165q--;
        this.f16167s = false;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C1440a(f fVar) {
        this(fVar.f16181s);
        this.f16168t = 2;
        this.f16169u = fVar;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C1440a(e eVar, int i) {
        this(eVar.f16190s);
        this.f16168t = i;
        switch (i) {
            case 1:
                this.f16169u = eVar;
                this(eVar.f16190s);
                break;
            default:
                this.f16169u = eVar;
                break;
        }
    }
}
