package o;

import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class KE {
    public final ArrayList a;

    public KE(int i) {
        switch (i) {
            case 1:
                this.a = new ArrayList(32);
                break;
            default:
                this.a = new ArrayList(20);
                break;
        }
    }

    public void a(String str, String str2) {
        AbstractC2001nt0.p(str);
        AbstractC2001nt0.q(str2, str);
        b(str, str2);
    }

    public void b(String str, String str2) {
        ArrayList arrayList = this.a;
        arrayList.add(str);
        arrayList.add(Za0.o0(str2).toString());
    }

    public void c(String str, String str2) {
        if (str.length() <= 0) {
            throw new IllegalArgumentException("name is empty");
        }
        int length = str.length();
        for (int i = 0; i < length; i++) {
            char cCharAt = str.charAt(i);
            if ('!' > cCharAt || cCharAt >= 127) {
                throw new IllegalArgumentException(AbstractC2264qi0.h("Unexpected char %#04x at %d in header name: %s", Integer.valueOf(cCharAt), Integer.valueOf(i), str).toString());
            }
        }
        b(str, str2);
    }

    public LE d() {
        return new LE((String[]) this.a.toArray(new String[0]));
    }

    public void e() {
        this.a.add(VV.c);
    }

    public void f(float f, float f2, float f3, float f4, float f5, float f6) {
        this.a.add(new WV(f, f2, f3, f4, f5, f6));
    }

    public void g(float f, float f2, float f3, float f4, float f5, float f6) {
        this.a.add(new C1100eW(f, f2, f3, f4, f5, f6));
    }

    public void h(float f) {
        this.a.add(new XV(f));
    }

    public void i(float f) {
        this.a.add(new C1196fW(f));
    }

    public void j(float f, float f2) {
        this.a.add(new YV(f, f2));
    }

    public void k(float f, float f2) {
        this.a.add(new C1292gW(f, f2));
    }

    public void l(float f, float f2) {
        this.a.add(new ZV(f, f2));
    }

    public void m(float f, float f2, float f3, float f4) {
        this.a.add(new C0814bW(f, f2, f3, f4));
    }

    public void n(float f, float f2, float f3, float f4) {
        this.a.add(new C1578jW(f, f2, f3, f4));
    }

    public void o(String str) {
        int i = 0;
        while (true) {
            ArrayList arrayList = this.a;
            if (i >= arrayList.size()) {
                return;
            }
            if (str.equalsIgnoreCase((String) arrayList.get(i))) {
                arrayList.remove(i);
                arrayList.remove(i);
                i -= 2;
            }
            i += 2;
        }
    }

    public void p(String str, String str2) {
        AbstractC2001nt0.p(str);
        AbstractC2001nt0.q(str2, str);
        o(str);
        b(str, str2);
    }

    public void q(float f) {
        this.a.add(new C1863mW(f));
    }

    public void r(float f) {
        this.a.add(new C1768lW(f));
    }
}
