package F3;

import java.util.AbstractMap;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.RandomAccess;
import java.util.Set;

/* JADX INFO: renamed from: F3.f, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public class C0206f extends AbstractMap {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public transient C0203d f1554a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public transient C0224y f1555b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final transient Map f1556c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ AbstractC0199b f1557d;

    public C0206f(AbstractC0199b abstractC0199b, Map map) {
        this.f1557d = abstractC0199b;
        this.f1556c = map;
    }

    public final K a(Map.Entry entry) {
        Object key = entry.getKey();
        Collection collection = (Collection) entry.getValue();
        AbstractC0199b abstractC0199b = this.f1557d;
        abstractC0199b.getClass();
        List list = (List) collection;
        return new K(key, list instanceof RandomAccess ? new C0210j(abstractC0199b, key, list, null) : new C0214n(abstractC0199b, key, list, null));
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final void clear() {
        AbstractC0199b abstractC0199b = this.f1557d;
        if (this.f1556c == abstractC0199b.f1535e) {
            abstractC0199b.e();
            return;
        }
        C0205e c0205e = new C0205e(this);
        while (c0205e.hasNext()) {
            c0205e.next();
            c0205e.remove();
        }
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final boolean containsKey(Object obj) {
        Map map = this.f1556c;
        map.getClass();
        try {
            return map.containsKey(obj);
        } catch (ClassCastException | NullPointerException unused) {
            return false;
        }
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final Set entrySet() {
        C0203d c0203d = this.f1554a;
        if (c0203d != null) {
            return c0203d;
        }
        C0203d c0203d2 = new C0203d(this);
        this.f1554a = c0203d2;
        return c0203d2;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final boolean equals(Object obj) {
        return this == obj || this.f1556c.equals(obj);
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final Object get(Object obj) {
        Object obj2;
        Map map = this.f1556c;
        map.getClass();
        try {
            obj2 = map.get(obj);
        } catch (ClassCastException | NullPointerException unused) {
            obj2 = null;
        }
        Collection collection = (Collection) obj2;
        if (collection == null) {
            return null;
        }
        AbstractC0199b abstractC0199b = this.f1557d;
        abstractC0199b.getClass();
        List list = (List) collection;
        return list instanceof RandomAccess ? new C0210j(abstractC0199b, obj, list, null) : new C0214n(abstractC0199b, obj, list, null);
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final int hashCode() {
        return this.f1556c.hashCode();
    }

    @Override // java.util.AbstractMap, java.util.Map
    public Set keySet() {
        AbstractC0199b abstractC0199b = this.f1557d;
        Set set = abstractC0199b.f1590b;
        if (set != null) {
            return set;
        }
        Set setH = abstractC0199b.h();
        abstractC0199b.f1590b = setH;
        return setH;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final Object remove(Object obj) {
        Collection collection = (Collection) this.f1556c.remove(obj);
        if (collection == null) {
            return null;
        }
        AbstractC0199b abstractC0199b = this.f1557d;
        Collection collectionG = abstractC0199b.g();
        collectionG.addAll(collection);
        abstractC0199b.f1536f -= collection.size();
        collection.clear();
        return collectionG;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final int size() {
        return this.f1556c.size();
    }

    @Override // java.util.AbstractMap
    public final String toString() {
        return this.f1556c.toString();
    }

    @Override // java.util.AbstractMap, java.util.Map
    public final Collection values() {
        C0224y c0224y = this.f1555b;
        if (c0224y != null) {
            return c0224y;
        }
        C0224y c0224y2 = new C0224y(this);
        this.f1555b = c0224y2;
        return c0224y2;
    }
}
