package com.google.android.gms.internal.measurement; import java.util.Iterator; import java.util.List; import java.util.Map; /* JADX INFO: Add missing generic type declarations: [V, K] */ /* loaded from: classes.dex */ final class zzww implements Iterator> { private int a; private boolean b; private Iterator> c; private final /* synthetic */ zzwo d; private zzww(zzwo zzwoVar) { this.d = zzwoVar; this.a = -1; } private final Iterator> a() { Map map; if (this.c == null) { map = this.d.c; this.c = map.entrySet().iterator(); } return this.c; } @Override // java.util.Iterator public final boolean hasNext() { List list; Map map; int i = this.a + 1; list = this.d.b; if (i >= list.size()) { map = this.d.c; if (map.isEmpty() || !a().hasNext()) { return false; } } return true; } @Override // java.util.Iterator public final /* synthetic */ Object next() { List list; List list2; this.b = true; int i = this.a + 1; this.a = i; list = this.d.b; if (i >= list.size()) { return a().next(); } list2 = this.d.b; return (Map.Entry) list2.get(this.a); } @Override // java.util.Iterator public final void remove() { List list; if (!this.b) { throw new IllegalStateException("remove() was called before next()"); } this.b = false; this.d.f(); int i = this.a; list = this.d.b; if (i >= list.size()) { a().remove(); return; } zzwo zzwoVar = this.d; int i2 = this.a; this.a = i2 - 1; zzwoVar.c(i2); } /* synthetic */ zzww(zzwo zzwoVar, zzwp zzwpVar) { this(zzwoVar); } }