what-the-bank/sources/com/kofax/kmc/klo/logistics/data/ClassificationResult.java

70 lines
2.8 KiB
Java

package com.kofax.kmc.klo.logistics.data;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.kofax.kmc.ken.engines.ImageClassificationResult;
import com.kofax.kmc.ken.engines.version.KenVersion;
import com.kofax.kmc.klo.logistics.version.KloVersion;
import com.kofax.kmc.kut.utilities.SdkVersion;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
import com.kofax.kmc.kut.utilities.error.InternalError;
import com.kofax.kmc.kut.utilities.error.KmcRuntimeException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
/* loaded from: classes3.dex */
public class ClassificationResult implements Serializable, Cloneable {
private static final long serialVersionUID = -5992761528618637831L;
private transient String ah;
private transient Float aj;
public ClassificationResult(String str, float f) {
this.ah = null;
this.aj = Float.valueOf(BitmapDescriptorFactory.HUE_RED);
this.ah = str;
this.aj = Float.valueOf(f);
}
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public ClassificationResult m272clone() {
try {
return (ClassificationResult) super.clone();
} catch (CloneNotSupportedException unused) {
throw new InternalError("ClassificationResult: unexpected clone not supported exception");
}
}
public float getConfidence() {
return this.aj.floatValue();
}
private void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.defaultWriteObject();
objectOutputStream.writeObject(ClassificationResult.class.getName());
objectOutputStream.writeObject(KloVersion.getPackageVersion());
objectOutputStream.writeObject(this.ah);
objectOutputStream.writeObject(this.aj);
}
private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException, KmcRuntimeException {
objectInputStream.defaultReadObject();
String name = ImageClassificationResult.class.getName();
String name2 = ClassificationResult.class.getName();
String str = (String) objectInputStream.readObject();
if (name2.equalsIgnoreCase(str) || name.equalsIgnoreCase(str)) {
if (SdkVersion.versionCompatible(KenVersion.getPackageVersion(), (String) objectInputStream.readObject()).booleanValue()) {
this.ah = (String) objectInputStream.readObject();
this.aj = (Float) objectInputStream.readObject();
return;
}
throw new KmcRuntimeException(ErrorInfo.KMC_GN_DESERIALIZE_VERSION_ERROR);
}
throw new KmcRuntimeException(ErrorInfo.KMC_GN_DESERIALIZE_OBJECT_ERROR);
}
public String getClassId() {
return this.ah;
}
}