what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzwp.java

84 lines
2.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
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 zzwp<K, V> implements Iterator<Map.Entry<K, V>> {
private int pos;
private Iterator<Map.Entry<K, V>> zzbse;
private final zzwh zzbsf;
private boolean zzbsj;
private zzwp(zzwh zzwhVar) {
this.zzbsf = zzwhVar;
this.pos = -1;
}
@Override // java.util.Iterator
public final boolean hasNext() {
List list;
Map map;
int i = this.pos + 1;
list = this.zzbsf.zzbrz;
if (i >= list.size()) {
map = this.zzbsf.zzbsa;
if (map.isEmpty() || !zztc().hasNext()) {
return false;
}
}
return true;
}
@Override // java.util.Iterator
public final void remove() {
List list;
if (!this.zzbsj) {
throw new IllegalStateException("remove() was called before next()");
}
this.zzbsj = false;
this.zzbsf.zzta();
int i = this.pos;
list = this.zzbsf.zzbrz;
if (i >= list.size()) {
zztc().remove();
return;
}
zzwh zzwhVar = this.zzbsf;
int i2 = this.pos;
this.pos = i2 - 1;
zzwhVar.zzdq(i2);
}
private final Iterator<Map.Entry<K, V>> zztc() {
Map map;
if (this.zzbse == null) {
map = this.zzbsf.zzbsa;
this.zzbse = map.entrySet().iterator();
}
return this.zzbse;
}
@Override // java.util.Iterator
public final /* synthetic */ Object next() {
List list;
List list2;
this.zzbsj = true;
int i = this.pos + 1;
this.pos = i;
list = this.zzbsf.zzbrz;
if (i >= list.size()) {
return zztc().next();
}
list2 = this.zzbsf.zzbrz;
return (Map.Entry) list2.get(this.pos);
}
/* JADX INFO: Access modifiers changed from: package-private */
public /* synthetic */ zzwp(zzwh zzwhVar, zzwi zzwiVar) {
this(zzwhVar);
}
}