Rabbit-R1/android (non root)/java/sources/kotlin/enums/EnumEntriesList.java
2024-05-21 17:08:36 -04:00

83 lines
4.4 KiB
Java

package kotlin.enums;
import androidx.exifinterface.media.ExifInterface;
import java.io.Serializable;
import java.lang.Enum;
import kotlin.Metadata;
import kotlin.collections.AbstractList;
import kotlin.collections.ArraysKt;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: Access modifiers changed from: package-private */
/* compiled from: EnumEntries.kt */
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\t\n\u0002\u0010\u0000\n\u0000\b\u0003\u0018\u0000*\u000e\b\u0000\u0010\u0001*\b\u0012\u0004\u0012\u0002H\u00010\u00022\b\u0012\u0004\u0012\u0002H\u00010\u00032\b\u0012\u0004\u0012\u0002H\u00010\u00042\u00060\u0005j\u0002`\u0006B\u0013\u0012\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00028\u00000\\u0006\u0002\u0010\tJ\u0016\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00028\u0000H\u0096\u0002¢\u0006\u0002\u0010\u0012J\u0016\u0010\u0013\u001a\u00028\u00002\u0006\u0010\u0014\u001a\u00020\fH\u0096\u0002¢\u0006\u0002\u0010\u0015J\u0015\u0010\u0016\u001a\u00020\f2\u0006\u0010\u0011\u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010\u0017J\u0015\u0010\u0018\u001a\u00020\f2\u0006\u0010\u0011\u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010\u0017J\b\u0010\u0019\u001a\u00020\u001aH\u0002R\u0016\u0010\u0007\u001a\b\u0012\u0004\u0012\u00028\u00000\bX\u0082\u0004¢\u0006\u0004\n\u0002\u0010\nR\u0014\u0010\u000b\u001a\u00020\f8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\r\u0010\u000e¨\u0006\u001b"}, d2 = {"Lkotlin/enums/EnumEntriesList;", ExifInterface.GPS_DIRECTION_TRUE, "", "Lkotlin/enums/EnumEntries;", "Lkotlin/collections/AbstractList;", "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", "entries", "", "([Ljava/lang/Enum;)V", "[Ljava/lang/Enum;", "size", "", "getSize", "()I", "contains", "", "element", "(Ljava/lang/Enum;)Z", "get", "index", "(I)Ljava/lang/Enum;", "indexOf", "(Ljava/lang/Enum;)I", "lastIndexOf", "writeReplace", "", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class EnumEntriesList<T extends Enum<T>> extends AbstractList<T> implements EnumEntries<T>, Serializable {
private final T[] entries;
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.collections.AbstractCollection, java.util.Collection, java.util.List
public final /* bridge */ boolean contains(Object obj) {
if (obj instanceof Enum) {
return contains((EnumEntriesList<T>) obj);
}
return false;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.collections.AbstractList, java.util.List
public final /* bridge */ int indexOf(Object obj) {
if (obj instanceof Enum) {
return indexOf((EnumEntriesList<T>) obj);
}
return -1;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.collections.AbstractList, java.util.List
public final /* bridge */ int lastIndexOf(Object obj) {
if (obj instanceof Enum) {
return lastIndexOf((EnumEntriesList<T>) obj);
}
return -1;
}
public EnumEntriesList(T[] entries) {
Intrinsics.checkNotNullParameter(entries, "entries");
this.entries = entries;
}
@Override // kotlin.collections.AbstractList, kotlin.collections.AbstractCollection
public int getSize() {
return this.entries.length;
}
@Override // kotlin.collections.AbstractList, java.util.List
public T get(int index) {
AbstractList.INSTANCE.checkElementIndex$kotlin_stdlib(index, this.entries.length);
return this.entries[index];
}
public boolean contains(T element) {
Intrinsics.checkNotNullParameter(element, "element");
return ((Enum) ArraysKt.getOrNull(this.entries, element.ordinal())) == element;
}
public int indexOf(T element) {
Intrinsics.checkNotNullParameter(element, "element");
int ordinal = element.ordinal();
if (((Enum) ArraysKt.getOrNull(this.entries, ordinal)) == element) {
return ordinal;
}
return -1;
}
public int lastIndexOf(T element) {
Intrinsics.checkNotNullParameter(element, "element");
return indexOf((Object) element);
}
private final Object writeReplace() {
return new EnumEntriesSerializationProxy(this.entries);
}
}