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

88 lines
2.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import com.huawei.hms.framework.common.ContainerUtils;
import java.util.Map;
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX INFO: Add missing generic type declarations: [V, K] */
/* JADX WARN: Incorrect field signature: TK; */
/* loaded from: classes2.dex */
public final class zzwo<K, V> implements Comparable<zzwo>, Map.Entry<K, V> {
private V value;
private final zzwh zzbsf;
private final Comparable zzbsi;
/* JADX INFO: Access modifiers changed from: package-private */
public zzwo(zzwh zzwhVar, Map.Entry<K, V> entry) {
this(zzwhVar, (Comparable) entry.getKey(), entry.getValue());
}
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: Multi-variable type inference failed */
public zzwo(zzwh zzwhVar, K k, V v) {
this.zzbsf = zzwhVar;
this.zzbsi = k;
this.value = v;
}
@Override // java.util.Map.Entry
public final V setValue(V v) {
this.zzbsf.zzta();
V v2 = this.value;
this.value = v;
return v2;
}
@Override // java.util.Map.Entry
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Map.Entry)) {
return false;
}
Map.Entry entry = (Map.Entry) obj;
return equals(this.zzbsi, entry.getKey()) && equals(this.value, entry.getValue());
}
@Override // java.util.Map.Entry
public final int hashCode() {
Comparable comparable = this.zzbsi;
int hashCode = comparable == null ? 0 : comparable.hashCode();
V v = this.value;
return hashCode ^ (v != null ? v.hashCode() : 0);
}
public final String toString() {
String valueOf = String.valueOf(this.zzbsi);
String valueOf2 = String.valueOf(this.value);
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 1 + String.valueOf(valueOf2).length());
sb.append(valueOf);
sb.append(ContainerUtils.KEY_VALUE_DELIMITER);
sb.append(valueOf2);
return sb.toString();
}
private static boolean equals(Object obj, Object obj2) {
if (obj == null) {
return obj2 == null;
}
return obj.equals(obj2);
}
@Override // java.lang.Comparable
public final /* synthetic */ int compareTo(zzwo zzwoVar) {
return ((Comparable) getKey()).compareTo((Comparable) zzwoVar.getKey());
}
@Override // java.util.Map.Entry
public final V getValue() {
return this.value;
}
@Override // java.util.Map.Entry
public final /* synthetic */ Object getKey() {
return this.zzbsi;
}
}