package p6;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import kotlin.jvm.internal.t;
import sm.c0;
import sm.v;

/* loaded from: classes.dex */
public final class e implements Map, en.d {

    /* renamed from: p, reason: collision with root package name */
    private final Map f32270p = new LinkedHashMap();

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes.dex */
    public static final class a implements Map.Entry, en.a {

        /* renamed from: p, reason: collision with root package name */
        private final Object f32271p;

        /* renamed from: q, reason: collision with root package name */
        private Object f32272q;

        public a(Object obj, Object obj2) {
            this.f32271p = obj;
            this.f32272q = obj2;
        }

        public void a(Object obj) {
            this.f32272q = obj;
        }

        @Override // java.util.Map.Entry
        public boolean equals(Object obj) {
            if (obj == null || !(obj instanceof Map.Entry)) {
                return false;
            }
            Map.Entry entry = (Map.Entry) obj;
            return t.b(entry.getKey(), getKey()) && t.b(entry.getValue(), getValue());
        }

        @Override // java.util.Map.Entry
        public Object getKey() {
            return this.f32271p;
        }

        @Override // java.util.Map.Entry
        public Object getValue() {
            return this.f32272q;
        }

        @Override // java.util.Map.Entry
        public int hashCode() {
            Object key = getKey();
            t.d(key);
            int hashCode = key.hashCode() + 527;
            Object value = getValue();
            t.d(value);
            return hashCode + value.hashCode();
        }

        @Override // java.util.Map.Entry
        public Object setValue(Object obj) {
            a(obj);
            return getValue();
        }

        public String toString() {
            StringBuilder sb2 = new StringBuilder();
            sb2.append(getKey());
            sb2.append('=');
            sb2.append(getValue());
            return sb2.toString();
        }
    }

    public boolean a(String key) {
        g b10;
        t.g(key, "key");
        Map map = this.f32270p;
        b10 = f.b(key);
        return map.containsKey(b10);
    }

    public Object b(String key) {
        g b10;
        t.g(key, "key");
        Map map = this.f32270p;
        b10 = f.b(key);
        return map.get(b10);
    }

    public Set c() {
        int v10;
        Set W0;
        Set<Map.Entry> entrySet = this.f32270p.entrySet();
        v10 = v.v(entrySet, 10);
        ArrayList arrayList = new ArrayList(v10);
        for (Map.Entry entry : entrySet) {
            arrayList.add(new a(((g) entry.getKey()).a(), entry.getValue()));
        }
        W0 = c0.W0(arrayList);
        return W0;
    }

    @Override // java.util.Map
    public void clear() {
        this.f32270p.clear();
    }

    @Override // java.util.Map
    public final /* bridge */ boolean containsKey(Object obj) {
        if (obj instanceof String) {
            return a((String) obj);
        }
        return false;
    }

    @Override // java.util.Map
    public boolean containsValue(Object obj) {
        return this.f32270p.containsValue(obj);
    }

    public Set d() {
        int v10;
        Set W0;
        Set keySet = this.f32270p.keySet();
        v10 = v.v(keySet, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = keySet.iterator();
        while (it.hasNext()) {
            arrayList.add(((g) it.next()).a());
        }
        W0 = c0.W0(arrayList);
        return W0;
    }

    public int e() {
        return this.f32270p.size();
    }

    @Override // java.util.Map
    public final /* bridge */ Set entrySet() {
        return c();
    }

    public Collection f() {
        return this.f32270p.values();
    }

    @Override // java.util.Map
    /* renamed from: g, reason: merged with bridge method [inline-methods] */
    public Object put(String key, Object obj) {
        g b10;
        t.g(key, "key");
        Map map = this.f32270p;
        b10 = f.b(key);
        return map.put(b10, obj);
    }

    @Override // java.util.Map
    public final /* bridge */ Object get(Object obj) {
        if (obj instanceof String) {
            return b((String) obj);
        }
        return null;
    }

    public Object h(String key) {
        g b10;
        t.g(key, "key");
        Map map = this.f32270p;
        b10 = f.b(key);
        return map.remove(b10);
    }

    @Override // java.util.Map
    public boolean isEmpty() {
        return this.f32270p.isEmpty();
    }

    @Override // java.util.Map
    public final /* bridge */ Set keySet() {
        return d();
    }

    @Override // java.util.Map
    public void putAll(Map from) {
        t.g(from, "from");
        for (Map.Entry entry : from.entrySet()) {
            put((String) entry.getKey(), entry.getValue());
        }
    }

    @Override // java.util.Map
    public final /* bridge */ Object remove(Object obj) {
        if (obj instanceof String) {
            return h((String) obj);
        }
        return null;
    }

    @Override // java.util.Map
    public final /* bridge */ int size() {
        return e();
    }

    @Override // java.util.Map
    public final /* bridge */ Collection values() {
        return f();
    }
}
