37 lines
1.0 KiB
Java
37 lines
1.0 KiB
Java
|
package com.google.android.gms.internal.firebase_ml;
|
||
|
|
||
|
import java.util.concurrent.ConcurrentHashMap;
|
||
|
import java.util.concurrent.ConcurrentMap;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class zzwb {
|
||
|
private static final zzwb zzbrq = new zzwb();
|
||
|
private final ConcurrentMap<Class<?>, zzwe<?>> zzbrs = new ConcurrentHashMap();
|
||
|
private final zzwf zzbrr = new zzvd();
|
||
|
|
||
|
public final <T> zzwe<T> zzk(Class<T> cls) {
|
||
|
zzug.zza(cls, "messageType");
|
||
|
zzwe<T> zzweVar = (zzwe) this.zzbrs.get(cls);
|
||
|
if (zzweVar != null) {
|
||
|
return zzweVar;
|
||
|
}
|
||
|
zzwe<T> zzj = this.zzbrr.zzj(cls);
|
||
|
zzug.zza(cls, "messageType");
|
||
|
zzug.zza(zzj, "schema");
|
||
|
zzwe<T> zzweVar2 = (zzwe) this.zzbrs.putIfAbsent(cls, zzj);
|
||
|
return zzweVar2 != null ? zzweVar2 : zzj;
|
||
|
}
|
||
|
|
||
|
public final <T> zzwe<T> zzad(T t) {
|
||
|
return zzk(t.getClass());
|
||
|
}
|
||
|
|
||
|
private zzwb() {
|
||
|
}
|
||
|
|
||
|
public static zzwb zzso() {
|
||
|
return zzbrq;
|
||
|
}
|
||
|
}
|