mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 17:42:33 -06:00
45 lines
1.4 KiB
Java
45 lines
1.4 KiB
Java
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<K, V> implements Map.Entry<K, V> {
|
|
@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();
|
|
}
|
|
}
|