package androidx.room.util;

import java.util.ArrayList;
import java.util.List;
import kotlin.collections.n;

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

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

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

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

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

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r5v1, types: [java.util.Collection] */
    /* JADX WARN: Type inference failed for: r5v2 */
    /* JADX WARN: Type inference failed for: r5v4, types: [java.util.ArrayList] */
    public j(String str, boolean z10, List list, List list2) {
        nb.g.i(str, "name");
        nb.g.i(list, "columns");
        nb.g.i(list2, "orders");
        this.f4184a = str;
        this.f4185b = z10;
        this.f4186c = list;
        this.f4187d = list2;
        List arrayList = list2;
        if (arrayList.isEmpty()) {
            int size = list.size();
            arrayList = new ArrayList(size);
            for (int i10 = 0; i10 < size; i10++) {
                arrayList.add("ASC");
            }
        }
        this.f4187d = (List) arrayList;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof j) {
            j jVar = (j) obj;
            if (this.f4185b == jVar.f4185b && nb.g.c(this.f4186c, jVar.f4186c) && nb.g.c(this.f4187d, jVar.f4187d)) {
                String str = this.f4184a;
                boolean zJ0 = kotlin.text.h.j0(str, "index_", false);
                String str2 = jVar.f4184a;
                return zJ0 ? kotlin.text.h.j0(str2, "index_", false) : nb.g.c(str, str2);
            }
        }
        return false;
    }

    public final int hashCode() {
        String str = this.f4184a;
        return this.f4187d.hashCode() + ((this.f4186c.hashCode() + ((((kotlin.text.h.j0(str, "index_", false) ? -1184239155 : str.hashCode()) * 31) + (this.f4185b ? 1 : 0)) * 31)) * 31);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("\n            |Index {\n            |   name = '");
        sb.append(this.f4184a);
        sb.append("',\n            |   unique = '");
        sb.append(this.f4185b);
        sb.append("',\n            |   columns = {");
        kotlin.text.d.X(n.j1(this.f4186c, ",", null, null, null, 62));
        kotlin.text.d.X("},");
        kd.e eVar = kd.e.f29109a;
        sb.append(eVar);
        sb.append("\n            |   orders = {");
        kotlin.text.d.X(n.j1(this.f4187d, ",", null, null, null, 62));
        kotlin.text.d.X(" }");
        sb.append(eVar);
        sb.append("\n            |}\n        ");
        return kotlin.text.d.X(kotlin.text.d.Y(sb.toString()));
    }

    public j(String str, List list) {
        nb.g.i(list, "columns");
        int size = list.size();
        ArrayList arrayList = new ArrayList(size);
        for (int i10 = 0; i10 < size; i10++) {
            arrayList.add("ASC");
        }
        this(str, false, list, arrayList);
    }
}
