package defpackage;

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

/* renamed from: ʾˋˉ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0248 extends AbstractSet {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ C2009 f1794;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f1795;

    public /* synthetic */ C0248(C2009 c2009, int i) {
        this.f1795 = i;
        this.f1794 = c2009;
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final void clear() {
        int i = this.f1795;
        C2009 c2009 = this.f1794;
        switch (i) {
            case 0:
                c2009.clear();
                break;
            default:
                c2009.clear();
                break;
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean contains(Object obj) {
        C1538 c1538M5540;
        Object obj2;
        Object value;
        int i = this.f1795;
        C2009 c2009 = this.f1794;
        switch (i) {
            case 0:
                if (!(obj instanceof Map.Entry)) {
                    return false;
                }
                Map.Entry entry = (Map.Entry) obj;
                Object key = entry.getKey();
                C1538 c1538 = null;
                if (key != null) {
                    try {
                        c1538M5540 = c2009.m5540(key, false);
                    } catch (ClassCastException unused) {
                    }
                } else {
                    c1538M5540 = null;
                }
                if (c1538M5540 != null && ((obj2 = c1538M5540.f6150) == (value = entry.getValue()) || (obj2 != null && obj2.equals(value)))) {
                    c1538 = c1538M5540;
                }
                return c1538 != null;
            default:
                return c2009.containsKey(obj);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
    public final Iterator iterator() {
        int i = this.f1795;
        C2009 c2009 = this.f1794;
        switch (i) {
            case 0:
                return new C1722(c2009, 0);
            default:
                return new C1722(c2009, 1);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final boolean remove(Object obj) {
        C1538 c1538M5540;
        Object obj2;
        Object value;
        int i = this.f1795;
        C1538 c1538M55402 = null;
        C2009 c2009 = this.f1794;
        switch (i) {
            case 0:
                if (obj instanceof Map.Entry) {
                    Map.Entry entry = (Map.Entry) obj;
                    Object key = entry.getKey();
                    if (key != null) {
                        try {
                            c1538M5540 = c2009.m5540(key, false);
                        } catch (ClassCastException unused) {
                        }
                    } else {
                        c1538M5540 = null;
                    }
                    if (c1538M5540 != null && ((obj2 = c1538M5540.f6150) == (value = entry.getValue()) || (obj2 != null && obj2.equals(value)))) {
                        c1538M55402 = c1538M5540;
                    }
                    if (c1538M55402 != null) {
                        c2009.m5539(c1538M55402, true);
                        break;
                    }
                }
                break;
            default:
                if (obj != null) {
                    try {
                        c1538M55402 = c2009.m5540(obj, false);
                    } catch (ClassCastException unused2) {
                    }
                }
                if (c1538M55402 != null) {
                    c2009.m5539(c1538M55402, true);
                }
                if (c1538M55402 != null) {
                    break;
                }
                break;
        }
        return true;
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final int size() {
        int i = this.f1795;
        C2009 c2009 = this.f1794;
        switch (i) {
        }
        return c2009.f8080;
    }
}
