package com.google.android.gms.internal.measurement;

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

/* JADX INFO: loaded from: classes2.dex */
public final class r implements Iterator {

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

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

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

    public /* synthetic */ r(Object obj, int i10) {
        this.f20379a = i10;
        this.f20381c = obj;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        int i10 = this.f20379a;
        Object obj = this.f20381c;
        switch (i10) {
            case 0:
                if (this.f20380b < ((p) obj).f20359a.length()) {
                }
                break;
            case 1:
                if (this.f20380b < ((p) obj).f20359a.length()) {
                }
                break;
            default:
                if (this.f20380b < ((e) obj).j()) {
                }
                break;
        }
        return true;
    }

    @Override // java.util.Iterator
    public final /* synthetic */ Object next() {
        int i10 = this.f20379a;
        Object obj = this.f20381c;
        switch (i10) {
            case 0:
                p pVar = (p) obj;
                if (this.f20380b >= pVar.f20359a.length()) {
                    throw new NoSuchElementException();
                }
                int i11 = this.f20380b;
                this.f20380b = i11 + 1;
                return new p(String.valueOf(pVar.f20359a.charAt(i11)));
            case 1:
                if (this.f20380b >= ((p) obj).f20359a.length()) {
                    throw new NoSuchElementException();
                }
                int i12 = this.f20380b;
                this.f20380b = i12 + 1;
                return new p(String.valueOf(i12));
            default:
                e eVar = (e) obj;
                if (this.f20380b >= eVar.j()) {
                    throw new NoSuchElementException(com.google.android.gms.measurement.internal.u1.g("Out of bounds index: ", this.f20380b));
                }
                int i13 = this.f20380b;
                this.f20380b = i13 + 1;
                return eVar.h(i13);
        }
    }
}
