package o;

import java.util.Collection;
import java.util.Iterator;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.xN, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2898xN extends W {
    public final /* synthetic */ int l;
    public final C2803wN m;

    public /* synthetic */ C2898xN(C2803wN c2803wN, int i) {
        this.l = i;
        this.m = c2803wN;
    }

    @Override // o.W
    public final int a() {
        switch (this.l) {
        }
        return this.m.t;
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean add(Object obj) {
        switch (this.l) {
            case 0:
                throw new UnsupportedOperationException();
            default:
                throw new UnsupportedOperationException();
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean addAll(Collection collection) {
        switch (this.l) {
            case 0:
                throw new UnsupportedOperationException();
            default:
                throw new UnsupportedOperationException();
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final void clear() {
        switch (this.l) {
            case 0:
                this.m.clear();
                break;
            default:
                this.m.clear();
                break;
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean contains(Object obj) {
        switch (this.l) {
            case 0:
                if (!(obj instanceof Map.Entry)) {
                    return false;
                }
                Map.Entry entry = (Map.Entry) obj;
                C2803wN c2803wN = this.m;
                c2803wN.getClass();
                int iF = c2803wN.f(entry.getKey());
                if (iF < 0) {
                    return false;
                }
                return F3.c(c2803wN.m[iF], entry.getValue());
            default:
                return this.m.containsKey(obj);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public boolean containsAll(Collection collection) {
        switch (this.l) {
            case 0:
                C2803wN c2803wN = this.m;
                c2803wN.getClass();
                for (Object obj : collection) {
                    if (obj == null) {
                        return false;
                    }
                    try {
                        Map.Entry entry = (Map.Entry) obj;
                        int iF = c2803wN.f(entry.getKey());
                        if (!(iF < 0 ? false : F3.c(c2803wN.m[iF], entry.getValue()))) {
                            return false;
                        }
                    } catch (ClassCastException unused) {
                        return false;
                    }
                }
                return true;
            default:
                return super.containsAll(collection);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean isEmpty() {
        switch (this.l) {
        }
        return this.m.isEmpty();
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
    public final Iterator iterator() {
        switch (this.l) {
            case 0:
                C2803wN c2803wN = this.m;
                c2803wN.getClass();
                return new C2518tN(c2803wN, 0);
            default:
                C2803wN c2803wN2 = this.m;
                c2803wN2.getClass();
                return new C2518tN(c2803wN2, 1);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean remove(Object obj) {
        switch (this.l) {
            case 0:
                if (obj instanceof Map.Entry) {
                    Map.Entry entry = (Map.Entry) obj;
                    C2803wN c2803wN = this.m;
                    c2803wN.c();
                    int iF = c2803wN.f(entry.getKey());
                    if (iF >= 0 && F3.c(c2803wN.m[iF], entry.getValue())) {
                        c2803wN.i(iF);
                        break;
                    }
                }
                break;
            default:
                C2803wN c2803wN2 = this.m;
                c2803wN2.c();
                int iF2 = c2803wN2.f(obj);
                if (iF2 >= 0) {
                    c2803wN2.i(iF2);
                    break;
                }
                break;
        }
        return true;
    }

    @Override // java.util.AbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean removeAll(Collection collection) {
        switch (this.l) {
            case 0:
                this.m.c();
                break;
            default:
                this.m.c();
                break;
        }
        return super.removeAll(collection);
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean retainAll(Collection collection) {
        switch (this.l) {
            case 0:
                this.m.c();
                break;
            default:
                this.m.c();
                break;
        }
        return super.retainAll(collection);
    }
}
