package androidx.room.util;

import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public final class h {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final boolean f4174c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f4175d;

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f4177f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final int f4178g;

    public h(int i10, String str, String str2, String str3, boolean z10, int i11) {
        nb.g.i(str, "name");
        nb.g.i(str2, "type");
        this.f4172a = str;
        this.f4173b = str2;
        this.f4174c = z10;
        this.f4175d = i10;
        this.f4176e = str3;
        this.f4177f = i11;
        String upperCase = str2.toUpperCase(Locale.ROOT);
        nb.g.h(upperCase, "toUpperCase(...)");
        this.f4178g = kotlin.text.i.l0(upperCase, "INT") ? 3 : (kotlin.text.i.l0(upperCase, "CHAR") || kotlin.text.i.l0(upperCase, "CLOB") || kotlin.text.i.l0(upperCase, "TEXT")) ? 2 : kotlin.text.i.l0(upperCase, "BLOB") ? 5 : (kotlin.text.i.l0(upperCase, "REAL") || kotlin.text.i.l0(upperCase, "FLOA") || kotlin.text.i.l0(upperCase, "DOUB")) ? 4 : 1;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof h) {
            h hVar = (h) obj;
            if ((this.f4175d > 0) == (hVar.f4175d > 0) && nb.g.c(this.f4172a, hVar.f4172a) && this.f4174c == hVar.f4174c) {
                int i10 = hVar.f4177f;
                String str = hVar.f4176e;
                int i11 = this.f4177f;
                String str2 = this.f4176e;
                if ((i11 != 1 || i10 != 2 || str2 == null || androidx.datastore.preferences.core.c.e(str2, str)) && ((i11 != 2 || i10 != 1 || str == null || androidx.datastore.preferences.core.c.e(str, str2)) && ((i11 == 0 || i11 != i10 || (str2 == null ? str == null : androidx.datastore.preferences.core.c.e(str2, str))) && this.f4178g == hVar.f4178g))) {
                    return true;
                }
            }
        }
        return false;
    }

    public final int hashCode() {
        return (((((this.f4172a.hashCode() * 31) + this.f4178g) * 31) + (this.f4174c ? 1231 : 1237)) * 31) + this.f4175d;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("\n            |Column {\n            |   name = '");
        sb.append(this.f4172a);
        sb.append("',\n            |   type = '");
        sb.append(this.f4173b);
        sb.append("',\n            |   affinity = '");
        sb.append(this.f4178g);
        sb.append("',\n            |   notNull = '");
        sb.append(this.f4174c);
        sb.append("',\n            |   primaryKeyPosition = '");
        sb.append(this.f4175d);
        sb.append("',\n            |   defaultValue = '");
        String str = this.f4176e;
        if (str == null) {
            str = "undefined";
        }
        sb.append(str);
        sb.append("'\n            |}\n        ");
        return kotlin.text.d.X(kotlin.text.d.Y(sb.toString()));
    }
}
