125 lines
3.6 KiB
Java
125 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.MTP;
|
|
|
|
/* renamed from: o.kpL, reason: case insensitive filesystem */
|
|
/* loaded from: classes2.dex */
|
|
public final class C16063kpL<K, V> extends LinkedHashMap<K, V> {
|
|
private static final C16063kpL d;
|
|
public boolean a;
|
|
|
|
public C16063kpL() {
|
|
this.a = true;
|
|
}
|
|
|
|
public C16063kpL(Map<K, V> map) {
|
|
super(map);
|
|
this.a = true;
|
|
}
|
|
|
|
static {
|
|
C16063kpL c16063kpL = new C16063kpL();
|
|
d = c16063kpL;
|
|
c16063kpL.a = 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 MTP.d((byte[]) obj);
|
|
}
|
|
if (obj instanceof MTP.IeS) {
|
|
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.a) {
|
|
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.a) {
|
|
MTP.d(k);
|
|
MTP.d(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.a) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
for (K k : map.keySet()) {
|
|
MTP.d(k);
|
|
MTP.d(map.get(k));
|
|
}
|
|
super.putAll(map);
|
|
}
|
|
|
|
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
|
|
public final V remove(Object obj) {
|
|
if (this.a) {
|
|
return (V) super.remove(obj);
|
|
}
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public static <K, V> C16063kpL<K, V> a() {
|
|
return d;
|
|
}
|
|
}
|