package o6;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import n4.u0;

/* JADX INFO: renamed from: o6.h, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1388h extends AbstractC1391k {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final C1381a f15870c = new C1381a(2);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final AbstractC1391k f15871a;

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

    public C1388h(AbstractC1391k abstractC1391k, int i) {
        this.f15872b = i;
        this.f15871a = abstractC1391k;
    }

    @Override // o6.AbstractC1391k
    public final Object b(AbstractC1394n abstractC1394n) {
        switch (this.f15872b) {
            case u0.f15495q /* 0 */:
                Collection collectionF = f();
                abstractC1394n.a();
                while (abstractC1394n.n()) {
                    ((ArrayList) collectionF).add(this.f15871a.b(abstractC1394n));
                }
                abstractC1394n.g();
                return collectionF;
            default:
                Collection collectionF2 = f();
                abstractC1394n.a();
                while (abstractC1394n.n()) {
                    collectionF2.add(this.f15871a.b(abstractC1394n));
                }
                abstractC1394n.g();
                return collectionF2;
        }
    }

    @Override // o6.AbstractC1391k
    public final void e(AbstractC1397q abstractC1397q, Object obj) {
        switch (this.f15872b) {
            case u0.f15495q /* 0 */:
                abstractC1397q.a();
                Iterator it = ((Collection) obj).iterator();
                while (it.hasNext()) {
                    this.f15871a.e(abstractC1397q, it.next());
                }
                ((C1396p) abstractC1397q).K(1, 2, ']');
                break;
            default:
                abstractC1397q.a();
                Iterator it2 = ((Collection) obj).iterator();
                while (it2.hasNext()) {
                    this.f15871a.e(abstractC1397q, it2.next());
                }
                ((C1396p) abstractC1397q).K(1, 2, ']');
                break;
        }
    }

    public final Collection f() {
        switch (this.f15872b) {
            case u0.f15495q /* 0 */:
                return new ArrayList();
            default:
                return new LinkedHashSet();
        }
    }

    public final String toString() {
        return this.f15871a + ".collection()";
    }
}
