jimu-decompiled/sources/com/squareup/haha/guava/collect/AbstractMapEntry.java
2025-05-13 19:24:51 +02:00

44 lines
1.1 KiB
Java

package com.squareup.haha.guava.collect;
import com.squareup.haha.guava.base.Joiner;
import java.util.Map;
/* loaded from: classes.dex */
abstract class AbstractMapEntry<K, V> implements Map.Entry<K, V> {
AbstractMapEntry() {
}
@Override // java.util.Map.Entry
public boolean equals(Object obj) {
if (obj instanceof Map.Entry) {
Map.Entry entry = (Map.Entry) obj;
if (Joiner.equal(getKey(), entry.getKey()) && Joiner.equal(getValue(), entry.getValue())) {
return true;
}
}
return false;
}
@Override // java.util.Map.Entry
public abstract K getKey();
@Override // java.util.Map.Entry
public abstract V 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);
}
@Override // java.util.Map.Entry
public V setValue(V v) {
throw new UnsupportedOperationException();
}
public String toString() {
return getKey() + "=" + getValue();
}
}