what-the-bank/sources/com/google/firebase/ml/custom/FirebaseModelInputOutputOpt...

49 lines
1.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.ml.custom;
import android.util.SparseArray;
import com.google.android.gms.internal.firebase_ml.zzpc;
import com.google.firebase.ml.common.FirebaseMLException;
import java.lang.reflect.Array;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes2.dex */
public final class FirebaseModelInputOutputOptions {
private final SparseArray<zzpc> zzasi;
private final SparseArray<zzpc> zzasj;
public final Map<Integer, Object> zzmn() throws FirebaseMLException {
Class cls;
int size = this.zzasj.size();
HashMap hashMap = new HashMap(size);
for (int i = 0; i < size; i++) {
int keyAt = this.zzasj.keyAt(i);
int type = this.zzasj.get(keyAt).getType();
if (type == 1) {
cls = Float.TYPE;
} else if (type == 2) {
cls = Integer.TYPE;
} else if (type == 3) {
cls = Byte.TYPE;
} else if (type == 4) {
cls = Long.TYPE;
} else {
StringBuilder sb = new StringBuilder(36);
sb.append("Not supported data type: ");
sb.append(type);
throw new FirebaseMLException(sb.toString(), 3);
}
hashMap.put(Integer.valueOf(keyAt), Array.newInstance((Class<?>) cls, this.zzasj.get(keyAt).zzms()));
}
return hashMap;
}
public final SparseArray<zzpc> zzmm() {
return this.zzasj;
}
public final SparseArray<zzpc> zzml() {
return this.zzasi;
}
}