126 lines
3.6 KiB
Java
126 lines
3.6 KiB
Java
|
package o;
|
||
|
|
||
|
import java.util.Arrays;
|
||
|
import java.util.Collections;
|
||
|
import java.util.LinkedHashMap;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
import o.oZe;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class EXy<K, V> extends LinkedHashMap<K, V> {
|
||
|
private static final EXy d;
|
||
|
boolean b;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public EXy() {
|
||
|
this.b = true;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public EXy(Map<K, V> map) {
|
||
|
super(map);
|
||
|
this.b = true;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
EXy eXy = new EXy();
|
||
|
d = eXy;
|
||
|
eXy.b = false;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map
|
||
|
public final Set<Map.Entry<K, V>> entrySet() {
|
||
|
return isEmpty() ? Collections.emptySet() : super.entrySet();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractMap, java.util.Map
|
||
|
public final boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj instanceof Map) {
|
||
|
Map map = (Map) obj;
|
||
|
if (this != map) {
|
||
|
if (size() == map.size()) {
|
||
|
for (Map.Entry<K, V> entry : entrySet()) {
|
||
|
if (map.containsKey(entry.getKey())) {
|
||
|
V value = entry.getValue();
|
||
|
Object obj2 = map.get(entry.getKey());
|
||
|
if ((value instanceof byte[]) && (obj2 instanceof byte[])) {
|
||
|
equals = Arrays.equals((byte[]) value, (byte[]) obj2);
|
||
|
} else {
|
||
|
equals = value.equals(obj2);
|
||
|
}
|
||
|
if (!equals) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
private static int d(Object obj) {
|
||
|
if (obj instanceof byte[]) {
|
||
|
return oZe.c((byte[]) obj);
|
||
|
}
|
||
|
if (obj instanceof oZe.LWm) {
|
||
|
throw new UnsupportedOperationException();
|
||
|
}
|
||
|
return obj.hashCode();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map
|
||
|
public final void clear() {
|
||
|
if (this.b) {
|
||
|
super.clear();
|
||
|
return;
|
||
|
}
|
||
|
throw new UnsupportedOperationException();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractMap, java.util.Map
|
||
|
public final int hashCode() {
|
||
|
int i = 0;
|
||
|
for (Map.Entry<K, V> entry : entrySet()) {
|
||
|
i += d(entry.getValue()) ^ d(entry.getKey());
|
||
|
}
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
|
||
|
public final V put(K k, V v) {
|
||
|
if (this.b) {
|
||
|
oZe.c(k);
|
||
|
oZe.c(v);
|
||
|
return (V) super.put(k, v);
|
||
|
}
|
||
|
throw new UnsupportedOperationException();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
|
||
|
public final void putAll(Map<? extends K, ? extends V> map) {
|
||
|
if (!this.b) {
|
||
|
throw new UnsupportedOperationException();
|
||
|
}
|
||
|
for (K k : map.keySet()) {
|
||
|
oZe.c(k);
|
||
|
oZe.c(map.get(k));
|
||
|
}
|
||
|
super.putAll(map);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
|
||
|
public final V remove(Object obj) {
|
||
|
if (this.b) {
|
||
|
return (V) super.remove(obj);
|
||
|
}
|
||
|
throw new UnsupportedOperationException();
|
||
|
}
|
||
|
|
||
|
public static <K, V> EXy<K, V> a() {
|
||
|
return d;
|
||
|
}
|
||
|
}
|