package y6;

import C3.AbstractC0055q;
import C3.a0;
import C3.b0;
import C3.f0;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import n4.u0;
import z0.m;

/* JADX INFO: renamed from: y6.b, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1767b implements Map {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f19037q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final Map f19038r;

    public /* synthetic */ C1767b(Map map, int i) {
        this.f19037q = i;
        this.f19038r = map;
    }

    @Override // java.util.Map
    public final void clear() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Dagger map bindings are immutable");
            default:
                this.f19038r.clear();
                return;
        }
    }

    @Override // java.util.Map
    public final boolean containsKey(Object obj) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                if (obj instanceof Class) {
                    return ((b0) this.f19038r).containsKey(((Class) obj).getName());
                }
                throw new IllegalArgumentException("Key must be a class");
            default:
                return obj != null && this.f19038r.containsKey(obj);
        }
    }

    @Override // java.util.Map
    public final boolean containsValue(Object obj) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                return ((b0) this.f19038r).containsValue(obj);
            default:
                Iterator it = ((f0) entrySet()).iterator();
                it.getClass();
                if (obj == null) {
                    while (it.hasNext()) {
                        if (((Map.Entry) it.next()).getValue() == null) {
                            return true;
                        }
                    }
                    return false;
                }
                while (it.hasNext()) {
                    if (obj.equals(((Map.Entry) it.next()).getValue())) {
                        return true;
                    }
                }
                return false;
        }
    }

    @Override // java.util.Map
    public final Set entrySet() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Maps created with @LazyClassKey do not support usage of entrySet(). Consider @ClassKey instead.");
            default:
                return AbstractC0055q.g(this.f19038r.entrySet(), new m(0));
        }
    }

    @Override // java.util.Map
    public boolean equals(Object obj) {
        switch (this.f19037q) {
            case 1:
                return obj != null && AbstractC0055q.e(this, obj);
            default:
                return super.equals(obj);
        }
    }

    @Override // java.util.Map
    public final Object get(Object obj) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                if (!(obj instanceof Class)) {
                    throw new IllegalArgumentException("Key must be a class");
                }
                return ((b0) this.f19038r).get(((Class) obj).getName());
            default:
                if (obj == null) {
                    return null;
                }
                return (List) this.f19038r.get(obj);
        }
    }

    @Override // java.util.Map
    public int hashCode() {
        switch (this.f19037q) {
            case 1:
                return AbstractC0055q.i(entrySet());
            default:
                return super.hashCode();
        }
    }

    @Override // java.util.Map
    public final boolean isEmpty() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                return ((b0) this.f19038r).isEmpty();
            default:
                Map map = this.f19038r;
                if (map.isEmpty()) {
                    return true;
                }
                return map.size() == 1 && map.containsKey(null);
        }
    }

    @Override // java.util.Map
    public final Set keySet() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Maps created with @LazyClassKey do not support usage of keySet(). Consider @ClassKey instead.");
            default:
                return AbstractC0055q.g(this.f19038r.keySet(), new m(1));
        }
    }

    @Override // java.util.Map
    public final Object put(Object obj, Object obj2) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Dagger map bindings are immutable");
            default:
                return this.f19038r.put(obj, obj2);
        }
    }

    @Override // java.util.Map
    public final void putAll(Map map) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Dagger map bindings are immutable");
            default:
                this.f19038r.putAll(map);
                return;
        }
    }

    @Override // java.util.Map
    public final Object remove(Object obj) {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                throw new UnsupportedOperationException("Dagger map bindings are immutable");
            default:
                return this.f19038r.remove(obj);
        }
    }

    @Override // java.util.Map
    public final int size() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                return ((b0) this.f19038r).f1249v;
            default:
                Map map = this.f19038r;
                return map.size() - (map.containsKey(null) ? 1 : 0);
        }
    }

    public String toString() {
        switch (this.f19037q) {
            case 1:
                return this.f19038r.toString();
            default:
                return super.toString();
        }
    }

    @Override // java.util.Map
    public final Collection values() {
        switch (this.f19037q) {
            case u0.f15495q /* 0 */:
                b0 b0Var = (b0) this.f19038r;
                a0 a0Var = b0Var.f1246s;
                if (a0Var != null) {
                    return a0Var;
                }
                a0 a0Var2 = new a0(b0Var.f1248u, 1, b0Var.f1249v);
                b0Var.f1246s = a0Var2;
                return a0Var2;
            default:
                return this.f19038r.values();
        }
    }
}
