what-the-bank/sources/com/google/common/collect/ForwardingMapEntry.java

62 lines
1.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.common.collect;
import com.google.common.base.Objects;
import com.huawei.hms.framework.common.ContainerUtils;
import java.util.Map;
/* loaded from: classes2.dex */
public abstract class ForwardingMapEntry<K, V> extends ForwardingObject implements Map.Entry<K, V> {
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.common.collect.ForwardingObject
public abstract Map.Entry<K, V> delegate();
@Override // java.util.Map.Entry
public K getKey() {
return delegate().getKey();
}
@Override // java.util.Map.Entry
public V getValue() {
return delegate().getValue();
}
public V setValue(V v) {
return delegate().setValue(v);
}
@Override // java.util.Map.Entry
public boolean equals(Object obj) {
return delegate().equals(obj);
}
@Override // java.util.Map.Entry
public int hashCode() {
return delegate().hashCode();
}
/* JADX INFO: Access modifiers changed from: protected */
public boolean standardEquals(Object obj) {
if (!(obj instanceof Map.Entry)) {
return false;
}
Map.Entry entry = (Map.Entry) obj;
return Objects.equal(getKey(), entry.getKey()) && Objects.equal(getValue(), entry.getValue());
}
protected int standardHashCode() {
K key = getKey();
V value = getValue();
return (key == null ? 0 : key.hashCode()) ^ (value != null ? value.hashCode() : 0);
}
protected String standardToString() {
String valueOf = String.valueOf(getKey());
String valueOf2 = String.valueOf(getValue());
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();
}
}