package F3;

import java.util.AbstractSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;

/* JADX INFO: renamed from: F3.w, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public final class C0222w extends AbstractSet {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ C0225z f1622b;

    public /* synthetic */ C0222w(C0225z c0225z, int i6) {
        this.f1621a = i6;
        this.f1622b = c0225z;
    }

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

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean contains(Object obj) {
        switch (this.f1621a) {
            case 0:
                C0225z c0225z = this.f1622b;
                Map mapB = c0225z.b();
                if (mapB != null) {
                    return mapB.entrySet().contains(obj);
                }
                if (obj instanceof Map.Entry) {
                    Map.Entry entry = (Map.Entry) obj;
                    int iD = c0225z.d(entry.getKey());
                    if (iD != -1 && android.support.v4.media.session.b.n(c0225z.k()[iD], entry.getValue())) {
                        return true;
                    }
                }
                return false;
            default:
                return this.f1622b.containsKey(obj);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
    public final Iterator iterator() {
        switch (this.f1621a) {
            case 0:
                C0225z c0225z = this.f1622b;
                Map mapB = c0225z.b();
                return mapB != null ? mapB.entrySet().iterator() : new C0221v(c0225z, 1);
            default:
                C0225z c0225z2 = this.f1622b;
                Map mapB2 = c0225z2.b();
                return mapB2 != null ? mapB2.keySet().iterator() : new C0221v(c0225z2, 0);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean remove(Object obj) {
        switch (this.f1621a) {
            case 0:
                C0225z c0225z = this.f1622b;
                Map mapB = c0225z.b();
                if (mapB != null) {
                    return mapB.entrySet().remove(obj);
                }
                if (obj instanceof Map.Entry) {
                    Map.Entry entry = (Map.Entry) obj;
                    if (!c0225z.g()) {
                        int iC = c0225z.c();
                        Object key = entry.getKey();
                        Object value = entry.getValue();
                        Object obj2 = c0225z.f1634a;
                        Objects.requireNonNull(obj2);
                        int iQ = AbstractC0220u.q(key, value, iC, obj2, c0225z.i(), c0225z.j(), c0225z.k());
                        if (iQ != -1) {
                            c0225z.f(iQ, iC);
                            c0225z.f1639f--;
                            c0225z.f1638e += 32;
                            return true;
                        }
                    }
                }
                return false;
            default:
                C0225z c0225z2 = this.f1622b;
                Map mapB2 = c0225z2.b();
                return mapB2 != null ? mapB2.keySet().remove(obj) : c0225z2.h(obj) != C0225z.f1633m;
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final int size() {
        switch (this.f1621a) {
        }
        return this.f1622b.size();
    }
}
