package com.google.common.collect; import com.google.common.base.Objects; import java.util.Map; import javax.annotation.CheckForNull; @ElementTypesAreNonnullByDefault /* loaded from: classes3.dex */ abstract class AbstractMapEntry implements Map.Entry { @Override // java.util.Map.Entry @ParametricNullness public abstract K getKey(); @Override // java.util.Map.Entry @ParametricNullness public abstract V getValue(); @Override // java.util.Map.Entry @ParametricNullness public V setValue(@ParametricNullness V v) { throw new UnsupportedOperationException(); } @Override // java.util.Map.Entry public boolean equals(@CheckForNull 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()); } @Override // java.util.Map.Entry public int hashCode() { K key = getKey(); V value = getValue(); return (key == null ? 0 : key.hashCode()) ^ (value != null ? value.hashCode() : 0); } public String toString() { String valueOf = String.valueOf(getKey()); String valueOf2 = String.valueOf(getValue()); return new StringBuilder(String.valueOf(valueOf).length() + 1 + String.valueOf(valueOf2).length()).append(valueOf).append("=").append(valueOf2).toString(); } }