package l3;

/* JADX INFO: loaded from: classes.dex */
public final class a implements i {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object[] f30101b;

    public a(String str, Object[] objArr) {
        nb.g.i(str, "query");
        this.f30100a = str;
        this.f30101b = objArr;
    }

    @Override // l3.i
    public final String e() {
        return this.f30100a;
    }

    @Override // l3.i
    public final void g(h hVar) {
        Object[] objArr = this.f30101b;
        if (objArr == null) {
            return;
        }
        int length = objArr.length;
        int i10 = 0;
        while (i10 < length) {
            Object obj = objArr[i10];
            i10++;
            if (obj == null) {
                hVar.d(i10);
            } else if (obj instanceof byte[]) {
                hVar.w(i10, (byte[]) obj);
            } else if (obj instanceof Float) {
                hVar.b(((Number) obj).floatValue(), i10);
            } else if (obj instanceof Double) {
                hVar.b(((Number) obj).doubleValue(), i10);
            } else if (obj instanceof Long) {
                hVar.a(i10, ((Number) obj).longValue());
            } else if (obj instanceof Integer) {
                hVar.a(i10, ((Number) obj).intValue());
            } else if (obj instanceof Short) {
                hVar.a(i10, ((Number) obj).shortValue());
            } else if (obj instanceof Byte) {
                hVar.a(i10, ((Number) obj).byteValue());
            } else if (obj instanceof String) {
                hVar.l(i10, (String) obj);
            } else {
                if (!(obj instanceof Boolean)) {
                    throw new IllegalArgumentException("Cannot bind " + obj + " at index " + i10 + " Supported types: Null, ByteArray, Float, Double, Long, Int, Short, Byte, String");
                }
                hVar.a(i10, ((Boolean) obj).booleanValue() ? 1L : 0L);
            }
        }
    }
}
