Rabbit-R1/android (non root)/java/sources/androidx/room/util/TableInfo.java
2024-05-21 17:08:36 -04:00

450 lines
28 KiB
Java

package androidx.room.util;
import androidx.room.Index;
import androidx.sqlite.db.SupportSQLiteDatabase;
import io.sentry.protocol.SentryThread;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.annotation.AnnotationRetention;
import kotlin.collections.SetsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\"\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\b\b\u0007\u0018\u0000 \u00152\u00020\u0001:\u0006\u0014\u0015\u0016\u0017\u0018\u0019B1\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005\u0012\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\\u0006\u0002\u0010\nBA\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005\u0012\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\b\u0012\u0010\b\u0002\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\f\u0018\u00010\\u0006\u0002\u0010\rJ\u0013\u0010\u000e\u001a\u00020\u000f2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\b\u0010\u0011\u001a\u00020\u0012H\u0016J\b\u0010\u0013\u001a\u00020\u0003H\u0016R\u001c\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u00058\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0018\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\f\u0018\u00010\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u001a"}, d2 = {"Landroidx/room/util/TableInfo;", "", "name", "", "columns", "", "Landroidx/room/util/TableInfo$Column;", "foreignKeys", "", "Landroidx/room/util/TableInfo$ForeignKey;", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Set;)V", "indices", "Landroidx/room/util/TableInfo$Index;", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Set;Ljava/util/Set;)V", "equals", "", "other", "hashCode", "", "toString", "Column", "Companion", "CreatedFrom", "ForeignKey", "ForeignKeyWithSequence", "Index", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public final class TableInfo {
public static final int CREATED_FROM_DATABASE = 2;
public static final int CREATED_FROM_ENTITY = 1;
public static final int CREATED_FROM_UNKNOWN = 0;
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
public final Map<String, Column> columns;
public final Set<ForeignKey> foreignKeys;
public final Set<Index> indices;
public final String name;
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0081\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Landroidx/room/util/TableInfo$CreatedFrom;", "", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
@Retention(RetentionPolicy.SOURCE)
@kotlin.annotation.Retention(AnnotationRetention.SOURCE)
/* loaded from: classes2.dex */
public @interface CreatedFrom {
}
@JvmStatic
public static final TableInfo read(SupportSQLiteDatabase supportSQLiteDatabase, String str) {
return INSTANCE.read(supportSQLiteDatabase, str);
}
public TableInfo(String name, Map<String, Column> columns, Set<ForeignKey> foreignKeys, Set<Index> set) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(columns, "columns");
Intrinsics.checkNotNullParameter(foreignKeys, "foreignKeys");
this.name = name;
this.columns = columns;
this.foreignKeys = foreignKeys;
this.indices = set;
}
public /* synthetic */ TableInfo(String str, Map map, Set set, Set set2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, map, set, (i & 8) != 0 ? null : set2);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public TableInfo(String name, Map<String, Column> columns, Set<ForeignKey> foreignKeys) {
this(name, columns, foreignKeys, SetsKt.emptySet());
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(columns, "columns");
Intrinsics.checkNotNullParameter(foreignKeys, "foreignKeys");
}
public boolean equals(Object other) {
Set<Index> set;
if (this == other) {
return true;
}
if (!(other instanceof TableInfo)) {
return false;
}
TableInfo tableInfo = (TableInfo) other;
if (!Intrinsics.areEqual(this.name, tableInfo.name) || !Intrinsics.areEqual(this.columns, tableInfo.columns) || !Intrinsics.areEqual(this.foreignKeys, tableInfo.foreignKeys)) {
return false;
}
Set<Index> set2 = this.indices;
if (set2 == null || (set = tableInfo.indices) == null) {
return true;
}
return Intrinsics.areEqual(set2, set);
}
public int hashCode() {
return (((this.name.hashCode() * 31) + this.columns.hashCode()) * 31) + this.foreignKeys.hashCode();
}
public String toString() {
return "TableInfo{name='" + this.name + "', columns=" + this.columns + ", foreignKeys=" + this.foreignKeys + ", indices=" + this.indices + '}';
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0018\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Landroidx/room/util/TableInfo$Companion;", "", "()V", "CREATED_FROM_DATABASE", "", "CREATED_FROM_ENTITY", "CREATED_FROM_UNKNOWN", "read", "Landroidx/room/util/TableInfo;", "database", "Landroidx/sqlite/db/SupportSQLiteDatabase;", "tableName", "", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@JvmStatic
public final TableInfo read(SupportSQLiteDatabase database, String tableName) {
Intrinsics.checkNotNullParameter(database, "database");
Intrinsics.checkNotNullParameter(tableName, "tableName");
return TableInfoKt.readTableInfo(database, tableName);
}
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0002\b\u0010\u0018\u0000 \u00172\u00020\u0001:\u0001\u0017B'\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\\u0006\u0002\u0010\tB7\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\b\u0010\n\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\u000b\u001a\u00020\\u0006\u0002\u0010\fJ\u0013\u0010\u0012\u001a\u00020\u00062\b\u0010\u0013\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\u0012\u0010\u0014\u001a\u00020\b2\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003H\u0003J\b\u0010\u0015\u001a\u00020\bH\u0016J\b\u0010\u0016\u001a\u00020\u0003H\u0016R\u0016\u0010\r\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\b\n\u0000\u0012\u0004\b\u000e\u0010\u000fR\u0010\u0010\u000b\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\n\u001a\u0004\u0018\u00010\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0010\u001a\u00020\u00068F¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u00020\u00068\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0018"}, d2 = {"Landroidx/room/util/TableInfo$Column;", "", "name", "", "type", "notNull", "", "primaryKeyPosition", "", "(Ljava/lang/String;Ljava/lang/String;ZI)V", "defaultValue", "createdFrom", "(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/String;I)V", "affinity", "getAffinity$annotations", "()V", "isPrimaryKey", "()Z", "equals", "other", "findAffinity", "hashCode", "toString", "Companion", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class Column {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
public final int affinity;
public final int createdFrom;
public final String defaultValue;
public final String name;
public final boolean notNull;
public final int primaryKeyPosition;
public final String type;
@JvmStatic
public static final boolean defaultValueEquals(String str, String str2) {
return INSTANCE.defaultValueEquals(str, str2);
}
public static /* synthetic */ void getAffinity$annotations() {
}
public final boolean isPrimaryKey() {
return this.primaryKeyPosition > 0;
}
public Column(String name, String type, boolean z, int i, String str, int i2) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(type, "type");
this.name = name;
this.type = type;
this.notNull = z;
this.primaryKeyPosition = i;
this.defaultValue = str;
this.createdFrom = i2;
this.affinity = findAffinity(type);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
@Deprecated(message = "Use {@link Column#Column(String, String, boolean, int, String, int)} instead.")
public Column(String name, String type, boolean z, int i) {
this(name, type, z, i, null, 0);
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(type, "type");
}
private final int findAffinity(String type) {
if (type == null) {
return 5;
}
Locale US = Locale.US;
Intrinsics.checkNotNullExpressionValue(US, "US");
String upperCase = type.toUpperCase(US);
Intrinsics.checkNotNullExpressionValue(upperCase, "this as java.lang.String).toUpperCase(locale)");
String str = upperCase;
if (StringsKt.contains$default((CharSequence) str, (CharSequence) "INT", false, 2, (Object) null)) {
return 3;
}
if (StringsKt.contains$default((CharSequence) str, (CharSequence) "CHAR", false, 2, (Object) null) || StringsKt.contains$default((CharSequence) str, (CharSequence) "CLOB", false, 2, (Object) null) || StringsKt.contains$default((CharSequence) str, (CharSequence) "TEXT", false, 2, (Object) null)) {
return 2;
}
if (StringsKt.contains$default((CharSequence) str, (CharSequence) "BLOB", false, 2, (Object) null)) {
return 5;
}
return (StringsKt.contains$default((CharSequence) str, (CharSequence) "REAL", false, 2, (Object) null) || StringsKt.contains$default((CharSequence) str, (CharSequence) "FLOA", false, 2, (Object) null) || StringsKt.contains$default((CharSequence) str, (CharSequence) "DOUB", false, 2, (Object) null)) ? 4 : 1;
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0002J\u001a\u0010\u0007\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\b\u001a\u0004\u0018\u00010\u0006H\u0007¨\u0006\t"}, d2 = {"Landroidx/room/util/TableInfo$Column$Companion;", "", "()V", "containsSurroundingParenthesis", "", SentryThread.JsonKeys.CURRENT, "", "defaultValueEquals", "other", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@JvmStatic
public final boolean defaultValueEquals(String current, String other) {
Intrinsics.checkNotNullParameter(current, "current");
if (Intrinsics.areEqual(current, other)) {
return true;
}
if (!containsSurroundingParenthesis(current)) {
return false;
}
String substring = current.substring(1, current.length() - 1);
Intrinsics.checkNotNullExpressionValue(substring, "this as java.lang.String…ing(startIndex, endIndex)");
return Intrinsics.areEqual(StringsKt.trim((CharSequence) substring).toString(), other);
}
private final boolean containsSurroundingParenthesis(String current) {
String str = current;
if (str.length() == 0) {
return false;
}
int i = 0;
int i2 = 0;
int i3 = 0;
while (i < str.length()) {
char charAt = str.charAt(i);
int i4 = i3 + 1;
if (i3 == 0 && charAt != '(') {
return false;
}
if (charAt == '(') {
i2++;
} else if (charAt == ')' && i2 - 1 == 0 && i3 != current.length() - 1) {
return false;
}
i++;
i3 = i4;
}
return i2 == 0;
}
}
public boolean equals(Object other) {
String str;
String str2;
String str3;
if (this == other) {
return true;
}
if (!(other instanceof Column) || this.primaryKeyPosition != ((Column) other).primaryKeyPosition) {
return false;
}
Column column = (Column) other;
if (!Intrinsics.areEqual(this.name, column.name) || this.notNull != column.notNull) {
return false;
}
if (this.createdFrom == 1 && column.createdFrom == 2 && (str3 = this.defaultValue) != null && !INSTANCE.defaultValueEquals(str3, column.defaultValue)) {
return false;
}
if (this.createdFrom == 2 && column.createdFrom == 1 && (str2 = column.defaultValue) != null && !INSTANCE.defaultValueEquals(str2, this.defaultValue)) {
return false;
}
int i = this.createdFrom;
return (i == 0 || i != column.createdFrom || ((str = this.defaultValue) == null ? column.defaultValue == null : INSTANCE.defaultValueEquals(str, column.defaultValue))) && this.affinity == column.affinity;
}
public int hashCode() {
return (((((this.name.hashCode() * 31) + this.affinity) * 31) + (this.notNull ? 1231 : 1237)) * 31) + this.primaryKeyPosition;
}
public String toString() {
StringBuilder append = new StringBuilder("Column{name='").append(this.name).append("', type='").append(this.type).append("', affinity='").append(this.affinity).append("', notNull=").append(this.notNull).append(", primaryKeyPosition=").append(this.primaryKeyPosition).append(", defaultValue='");
String str = this.defaultValue;
if (str == null) {
str = "undefined";
}
return append.append(str).append("'}").toString();
}
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0007\u0018\u00002\u00020\u0001B9\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007\u0012\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007¢\u0006\u0002\u0010\tJ\u0013\u0010\n\u001a\u00020\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\b\u0010\r\u001a\u00020\u000eH\u0016J\b\u0010\u000f\u001a\u00020\u0003H\u0016R\u0016\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u00078\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00030\u00078\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Landroidx/room/util/TableInfo$ForeignKey;", "", "referenceTable", "", "onDelete", "onUpdate", "columnNames", "", "referenceColumnNames", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)V", "equals", "", "other", "hashCode", "", "toString", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class ForeignKey {
public final List<String> columnNames;
public final String onDelete;
public final String onUpdate;
public final List<String> referenceColumnNames;
public final String referenceTable;
public ForeignKey(String referenceTable, String onDelete, String onUpdate, List<String> columnNames, List<String> referenceColumnNames) {
Intrinsics.checkNotNullParameter(referenceTable, "referenceTable");
Intrinsics.checkNotNullParameter(onDelete, "onDelete");
Intrinsics.checkNotNullParameter(onUpdate, "onUpdate");
Intrinsics.checkNotNullParameter(columnNames, "columnNames");
Intrinsics.checkNotNullParameter(referenceColumnNames, "referenceColumnNames");
this.referenceTable = referenceTable;
this.onDelete = onDelete;
this.onUpdate = onUpdate;
this.columnNames = columnNames;
this.referenceColumnNames = referenceColumnNames;
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ForeignKey)) {
return false;
}
ForeignKey foreignKey = (ForeignKey) other;
if (Intrinsics.areEqual(this.referenceTable, foreignKey.referenceTable) && Intrinsics.areEqual(this.onDelete, foreignKey.onDelete) && Intrinsics.areEqual(this.onUpdate, foreignKey.onUpdate) && Intrinsics.areEqual(this.columnNames, foreignKey.columnNames)) {
return Intrinsics.areEqual(this.referenceColumnNames, foreignKey.referenceColumnNames);
}
return false;
}
public int hashCode() {
return (((((((this.referenceTable.hashCode() * 31) + this.onDelete.hashCode()) * 31) + this.onUpdate.hashCode()) * 31) + this.columnNames.hashCode()) * 31) + this.referenceColumnNames.hashCode();
}
public String toString() {
return "ForeignKey{referenceTable='" + this.referenceTable + "', onDelete='" + this.onDelete + " +', onUpdate='" + this.onUpdate + "', columnNames=" + this.columnNames + ", referenceColumnNames=" + this.referenceColumnNames + '}';
}
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u000f\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u000b\b\u0000\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\u0006¢\u0006\u0002\u0010\bJ\u0011\u0010\u000f\u001a\u00020\u00032\u0006\u0010\u0010\u001a\u00020\u0000H\u0096\u0002R\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\fR\u0011\u0010\u0007\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\\u0006\u0011"}, d2 = {"Landroidx/room/util/TableInfo$ForeignKeyWithSequence;", "", "id", "", "sequence", "from", "", "to", "(IILjava/lang/String;Ljava/lang/String;)V", "getFrom", "()Ljava/lang/String;", "getId", "()I", "getSequence", "getTo", "compareTo", "other", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class ForeignKeyWithSequence implements Comparable<ForeignKeyWithSequence> {
private final String from;
private final int id;
private final int sequence;
private final String to;
public final String getFrom() {
return this.from;
}
public final int getId() {
return this.id;
}
public final int getSequence() {
return this.sequence;
}
public final String getTo() {
return this.to;
}
public ForeignKeyWithSequence(int i, int i2, String from, String to) {
Intrinsics.checkNotNullParameter(from, "from");
Intrinsics.checkNotNullParameter(to, "to");
this.id = i;
this.sequence = i2;
this.from = from;
this.to = to;
}
@Override // java.lang.Comparable
public int compareTo(ForeignKeyWithSequence other) {
Intrinsics.checkNotNullParameter(other, "other");
int i = this.id - other.id;
return i == 0 ? this.sequence - other.sequence : i;
}
}
/* compiled from: TableInfo.kt */
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010 \n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\b\u0003\b\u0007\u0018\u0000 \u00102\u00020\u0001:\u0001\u0010B%\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007¢\u0006\u0002\u0010\bB1\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007\u0012\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007¢\u0006\u0002\u0010\nJ\u0013\u0010\u000b\u001a\u00020\u00052\b\u0010\f\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\b\u0010\r\u001a\u00020\u000eH\u0016J\b\u0010\u000f\u001a\u00020\u0003H\u0016R\u0016\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u00078\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0018\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00030\u00078\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Landroidx/room/util/TableInfo$Index;", "", "name", "", "unique", "", "columns", "", "(Ljava/lang/String;ZLjava/util/List;)V", "orders", "(Ljava/lang/String;ZLjava/util/List;Ljava/util/List;)V", "equals", "other", "hashCode", "", "toString", "Companion", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes2.dex */
public static final class Index {
public static final String DEFAULT_PREFIX = "index_";
public final List<String> columns;
public final String name;
public List<String> orders;
public final boolean unique;
public Index(String name, boolean z, List<String> columns, List<String> orders) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(columns, "columns");
Intrinsics.checkNotNullParameter(orders, "orders");
this.name = name;
this.unique = z;
this.columns = columns;
this.orders = orders;
ArrayList arrayList = orders;
if (arrayList.isEmpty()) {
int size = columns.size();
ArrayList arrayList2 = new ArrayList(size);
for (int i = 0; i < size; i++) {
arrayList2.add(Index.Order.ASC.name());
}
arrayList = arrayList2;
}
this.orders = arrayList;
}
/* JADX WARN: Illegal instructions before constructor call */
@kotlin.Deprecated(message = "Use {@link #Index(String, boolean, List, List)}")
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public Index(java.lang.String r5, boolean r6, java.util.List<java.lang.String> r7) {
/*
r4 = this;
java.lang.String r0 = "name"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r5, r0)
java.lang.String r0 = "columns"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r7, r0)
int r0 = r7.size()
java.util.ArrayList r1 = new java.util.ArrayList
r1.<init>(r0)
r2 = 0
L14:
if (r2 >= r0) goto L22
androidx.room.Index$Order r3 = androidx.room.Index.Order.ASC
java.lang.String r3 = r3.name()
r1.add(r3)
int r2 = r2 + 1
goto L14
L22:
java.util.List r1 = (java.util.List) r1
r4.<init>(r5, r6, r7, r1)
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.room.util.TableInfo.Index.<init>(java.lang.String, boolean, java.util.List):void");
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Index)) {
return false;
}
Index index = (Index) other;
if (this.unique != index.unique || !Intrinsics.areEqual(this.columns, index.columns) || !Intrinsics.areEqual(this.orders, index.orders)) {
return false;
}
if (StringsKt.startsWith$default(this.name, DEFAULT_PREFIX, false, 2, (Object) null)) {
return StringsKt.startsWith$default(index.name, DEFAULT_PREFIX, false, 2, (Object) null);
}
return Intrinsics.areEqual(this.name, index.name);
}
public int hashCode() {
return ((((((StringsKt.startsWith$default(this.name, DEFAULT_PREFIX, false, 2, (Object) null) ? -1184239155 : this.name.hashCode()) * 31) + (this.unique ? 1 : 0)) * 31) + this.columns.hashCode()) * 31) + this.orders.hashCode();
}
public String toString() {
return "Index{name='" + this.name + "', unique=" + this.unique + ", columns=" + this.columns + ", orders=" + this.orders + "'}";
}
}
}