package o;

import java.util.AbstractCollection;
import java.util.Collection;
import java.util.Iterator;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.yN, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2993yN extends AbstractCollection implements Collection, InterfaceC3084zJ {
    public final /* synthetic */ int l;
    public final Object m;

    public /* synthetic */ C2993yN(int i, Object obj) {
        this.l = i;
        this.m = obj;
    }

    @Override // java.util.AbstractCollection, java.util.Collection
    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
    public boolean addAll(Collection collection) {
        switch (this.l) {
            case 0:
                throw new UnsupportedOperationException();
            default:
                return super.addAll(collection);
        }
    }

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

    @Override // java.util.AbstractCollection, java.util.Collection
    public final boolean contains(Object obj) {
        switch (this.l) {
            case 0:
                return ((C2803wN) this.m).containsValue(obj);
            default:
                return ((C3002yW) this.m).containsValue(obj);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection
    public boolean isEmpty() {
        switch (this.l) {
            case 0:
                return ((C2803wN) this.m).isEmpty();
            default:
                return super.isEmpty();
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable
    public final Iterator iterator() {
        switch (this.l) {
            case 0:
                C2803wN c2803wN = (C2803wN) this.m;
                c2803wN.getClass();
                return new C2518tN(c2803wN, 2);
            default:
                C3002yW c3002yW = (C3002yW) this.m;
                AbstractC0833bh0[] abstractC0833bh0Arr = new AbstractC0833bh0[8];
                for (int i = 0; i < 8; i++) {
                    abstractC0833bh0Arr[i] = new C0928ch0(2);
                }
                return new GW(c3002yW, abstractC0833bh0Arr);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection
    public boolean remove(Object obj) {
        int i;
        switch (this.l) {
            case 0:
                C2803wN c2803wN = (C2803wN) this.m;
                c2803wN.c();
                int i2 = c2803wN.q;
                while (true) {
                    i = -1;
                    i2--;
                    if (i2 >= 0) {
                        if (c2803wN.n[i2] >= 0 && F3.c(c2803wN.m[i2], obj)) {
                            i = i2;
                        }
                    }
                }
                if (i < 0) {
                    return false;
                }
                c2803wN.i(i);
                return true;
            default:
                return super.remove(obj);
        }
    }

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

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

    @Override // java.util.AbstractCollection, java.util.Collection
    public final int size() {
        switch (this.l) {
            case 0:
                return ((C2803wN) this.m).t;
            default:
                C3002yW c3002yW = (C3002yW) this.m;
                c3002yW.getClass();
                return c3002yW.p;
        }
    }
}
