what-the-bank/sources/com/google/android/gms/internal/gtm/zztk.java

84 lines
2.1 KiB
Java

package com.google.android.gms.internal.gtm;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* JADX INFO: Add missing generic type declarations: [V, K] */
/* loaded from: classes2.dex */
final class zztk<K, V> implements Iterator<Map.Entry<K, V>> {
private int pos;
private Iterator<Map.Entry<K, V>> zzbee;
private final zztc zzbef;
private boolean zzbej;
private zztk(zztc zztcVar) {
this.zzbef = zztcVar;
this.pos = -1;
}
@Override // java.util.Iterator
public final boolean hasNext() {
List list;
Map map;
int i = this.pos + 1;
list = this.zzbef.zzbdz;
if (i >= list.size()) {
map = this.zzbef.zzbea;
if (map.isEmpty() || !zzrf().hasNext()) {
return false;
}
}
return true;
}
@Override // java.util.Iterator
public final void remove() {
List list;
if (!this.zzbej) {
throw new IllegalStateException("remove() was called before next()");
}
this.zzbej = false;
this.zzbef.zzrd();
int i = this.pos;
list = this.zzbef.zzbdz;
if (i >= list.size()) {
zzrf().remove();
return;
}
zztc zztcVar = this.zzbef;
int i2 = this.pos;
this.pos = i2 - 1;
zztcVar.zzbw(i2);
}
private final Iterator<Map.Entry<K, V>> zzrf() {
Map map;
if (this.zzbee == null) {
map = this.zzbef.zzbea;
this.zzbee = map.entrySet().iterator();
}
return this.zzbee;
}
@Override // java.util.Iterator
public final /* synthetic */ Object next() {
List list;
List list2;
this.zzbej = true;
int i = this.pos + 1;
this.pos = i;
list = this.zzbef.zzbdz;
if (i >= list.size()) {
return zzrf().next();
}
list2 = this.zzbef.zzbdz;
return (Map.Entry) list2.get(this.pos);
}
/* JADX INFO: Access modifiers changed from: package-private */
public /* synthetic */ zztk(zztc zztcVar, zztd zztdVar) {
this(zztcVar);
}
}