package com.google.common.collect;

import java.util.AbstractCollection;
import java.util.Iterator;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public class s extends AbstractCollection {

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

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

    public s(t tVar, int i10) {
        this.f23719a = i10;
        if (i10 != 1) {
            this.f23720b = tVar;
        } else {
            this.f23720b = tVar;
        }
    }

    public final void c() {
        this.f23720b.clear();
    }

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

    @Override // java.util.AbstractCollection, java.util.Collection
    public final boolean contains(Object obj) {
        switch (this.f23719a) {
            case 0:
                return this.f23720b.d(obj);
            default:
                return f(obj);
        }
    }

    public final boolean f(Object obj) {
        if (!(obj instanceof Map.Entry)) {
            return false;
        }
        Map.Entry entry = (Map.Entry) obj;
        return this.f23720b.c(entry.getKey(), entry.getValue());
    }

    public final boolean g(Object obj) {
        if (!(obj instanceof Map.Entry)) {
            return false;
        }
        Map.Entry entry = (Map.Entry) obj;
        return this.f23720b.remove(entry.getKey(), entry.getValue());
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable
    public final Iterator iterator() {
        int i10 = this.f23719a;
        t tVar = this.f23720b;
        switch (i10) {
            case 0:
                return tVar.g();
            default:
                return tVar.e();
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection
    public final /* bridge */ /* synthetic */ boolean remove(Object obj) {
        switch (this.f23719a) {
            case 1:
                return g(obj);
            default:
                return super.remove(obj);
        }
    }

    @Override // java.util.AbstractCollection, java.util.Collection
    public final int size() {
        int i10 = this.f23719a;
        t tVar = this.f23720b;
        switch (i10) {
        }
        return tVar.size();
    }
}
