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

181 lines
5.3 KiB
Java

package com.google.android.gms.internal.firebase_ml;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
/* loaded from: classes2.dex */
public class zzhm extends AbstractMap<String, Object> implements Cloneable {
final zzhd zztx;
Map<String, Object> zzzr;
/* loaded from: classes2.dex */
public enum zzc {
IGNORE_CASE
}
public zzhm() {
this(EnumSet.noneOf(zzc.class));
}
/* loaded from: classes2.dex */
final class zzb extends AbstractSet<Map.Entry<String, Object>> {
private final zzhj zzzv;
private final zzhm zzzw;
zzb(zzhm zzhmVar) {
this.zzzw = zzhmVar;
this.zzzv = (zzhj) new zzhg(zzhmVar, zzhmVar.zztx.zzhc()).entrySet();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public final Iterator<Map.Entry<String, Object>> iterator() {
return new zza(this.zzzw, this.zzzv);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public final int size() {
return this.zzzw.zzzr.size() + this.zzzv.size();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public final void clear() {
this.zzzw.zzzr.clear();
this.zzzv.clear();
}
}
public zzhm(EnumSet<zzc> enumSet) {
this.zzzr = new zzgx();
this.zztx = zzhd.zza(getClass(), enumSet.contains(zzc.IGNORE_CASE));
}
/* loaded from: classes2.dex */
final class zza implements Iterator<Map.Entry<String, Object>> {
private boolean zzzs;
private final Iterator<Map.Entry<String, Object>> zzzt;
private final Iterator<Map.Entry<String, Object>> zzzu;
zza(zzhm zzhmVar, zzhj zzhjVar) {
this.zzzt = (zzhi) zzhjVar.iterator();
this.zzzu = zzhmVar.zzzr.entrySet().iterator();
}
@Override // java.util.Iterator
public final boolean hasNext() {
return this.zzzt.hasNext() || this.zzzu.hasNext();
}
@Override // java.util.Iterator
public final void remove() {
if (this.zzzs) {
this.zzzu.remove();
}
this.zzzt.remove();
}
@Override // java.util.Iterator
public final /* synthetic */ Map.Entry<String, Object> next() {
if (!this.zzzs) {
if (this.zzzt.hasNext()) {
return this.zzzt.next();
}
this.zzzs = true;
}
return this.zzzu.next();
}
}
@Override // java.util.AbstractMap, java.util.Map
public final Object get(Object obj) {
if (!(obj instanceof String)) {
return null;
}
String str = (String) obj;
zzhl zzao = this.zztx.zzao(str);
if (zzao != null) {
return zzao.zzh(this);
}
if (this.zztx.zzhc()) {
str = str.toLowerCase(Locale.US);
}
return this.zzzr.get(str);
}
@Override // java.util.AbstractMap, java.util.Map
/* renamed from: zzf, reason: merged with bridge method [inline-methods] */
public final Object put(String str, Object obj) {
zzhl zzao = this.zztx.zzao(str);
if (zzao != null) {
Object zzh = zzao.zzh(this);
zzao.zzb(this, obj);
return zzh;
}
if (this.zztx.zzhc()) {
str = str.toLowerCase(Locale.US);
}
return this.zzzr.put(str, obj);
}
public zzhm zzb(String str, Object obj) {
zzhl zzao = this.zztx.zzao(str);
if (zzao != null) {
zzao.zzb(this, obj);
} else {
if (this.zztx.zzhc()) {
str = str.toLowerCase(Locale.US);
}
this.zzzr.put(str, obj);
}
return this;
}
@Override // java.util.AbstractMap, java.util.Map
public final void putAll(Map<? extends String, ?> map) {
for (Map.Entry<? extends String, ?> entry : map.entrySet()) {
zzb(entry.getKey(), entry.getValue());
}
}
@Override // java.util.AbstractMap, java.util.Map
public final Object remove(Object obj) {
if (!(obj instanceof String)) {
return null;
}
String str = (String) obj;
if (this.zztx.zzao(str) != null) {
throw new UnsupportedOperationException();
}
if (this.zztx.zzhc()) {
str = str.toLowerCase(Locale.US);
}
return this.zzzr.remove(str);
}
@Override // java.util.AbstractMap, java.util.Map
public Set<Map.Entry<String, Object>> entrySet() {
return new zzb(this);
}
@Override // java.util.AbstractMap
/* renamed from: zzeh, reason: merged with bridge method [inline-methods] */
public zzhm clone() {
try {
zzhm zzhmVar = (zzhm) super.clone();
zzhf.zza(this, zzhmVar);
zzhmVar.zzzr = (Map) zzhf.clone(this.zzzr);
return zzhmVar;
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(e);
}
}
public final zzhd zzhi() {
return this.zztx;
}
}