package com.fyber.inneractive.sdk.protobuf; import com.fyber.inneractive.sdk.protobuf.y; import java.nio.charset.Charset; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; /* loaded from: classes2.dex */ public final class i0 extends LinkedHashMap { public static final i0 b; public boolean a; static { i0 i0Var = new i0(); b = i0Var; i0Var.a = false; } public i0() { this.a = true; } @Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map public final Set> entrySet() { return isEmpty() ? Collections.emptySet() : super.entrySet(); } @Override // java.util.AbstractMap, java.util.Map public final boolean equals(Object obj) { if (obj instanceof Map) { Map map = (Map) obj; if (this != map) { if (size() == map.size()) { for (Map.Entry entry : entrySet()) { if (map.containsKey(entry.getKey())) { V value = entry.getValue(); Object obj2 = map.get(entry.getKey()); if (!(((value instanceof byte[]) && (obj2 instanceof byte[])) ? Arrays.equals((byte[]) value, (byte[]) obj2) : value.equals(obj2))) { } } } } } return true; } return false; } @Override // java.util.AbstractMap, java.util.Map public final int hashCode() { int hashCode; int i = 0; for (Map.Entry entry : entrySet()) { K key = entry.getKey(); int i2 = 1; if (key instanceof byte[]) { byte[] bArr = (byte[]) key; Charset charset = y.a; hashCode = bArr.length; for (int i3 : bArr) { hashCode = (hashCode * 31) + i3; } if (hashCode == 0) { hashCode = 1; } } else { if (key instanceof y.c) { throw new UnsupportedOperationException(); } hashCode = key.hashCode(); } V value = entry.getValue(); if (value instanceof byte[]) { byte[] bArr2 = (byte[]) value; Charset charset2 = y.a; int length = bArr2.length; for (int i4 : bArr2) { length = (length * 31) + i4; } if (length != 0) { i2 = length; } } else { if (value instanceof y.c) { throw new UnsupportedOperationException(); } i2 = value.hashCode(); } i += hashCode ^ i2; } return i; } @Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map public final void clear() { if (!this.a) { throw new UnsupportedOperationException(); } super.clear(); } @Override // java.util.HashMap, java.util.AbstractMap, java.util.Map public final V put(K k, V v) { if (!this.a) { throw new UnsupportedOperationException(); } Charset charset = y.a; k.getClass(); v.getClass(); return (V) super.put(k, v); } @Override // java.util.HashMap, java.util.AbstractMap, java.util.Map public final void putAll(Map map) { if (!this.a) { throw new UnsupportedOperationException(); } for (K k : map.keySet()) { Charset charset = y.a; k.getClass(); map.get(k).getClass(); } 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 i0(Map map) { super(map); this.a = true; } }