Files
rr3-apk/decompiled/sources/kotlin/collections/CollectionsKt__CollectionsKt.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

68 lines
2.2 KiB
Java

package kotlin.collections;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes5.dex */
public abstract class CollectionsKt__CollectionsKt extends CollectionsKt__CollectionsJVMKt {
public static final Collection asCollection(Object[] objArr) {
Intrinsics.checkNotNullParameter(objArr, "<this>");
return new ArrayAsCollection(objArr, false);
}
public static List emptyList() {
return EmptyList.INSTANCE;
}
public static List listOf(Object... elements) {
List asList;
Intrinsics.checkNotNullParameter(elements, "elements");
if (elements.length <= 0) {
return emptyList();
}
asList = ArraysKt___ArraysJvmKt.asList(elements);
return asList;
}
public static List mutableListOf(Object... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return elements.length == 0 ? new ArrayList() : new ArrayList(new ArrayAsCollection(elements, true));
}
public static ArrayList arrayListOf(Object... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return elements.length == 0 ? new ArrayList() : new ArrayList(new ArrayAsCollection(elements, true));
}
public static List listOfNotNull(Object... elements) {
List filterNotNull;
Intrinsics.checkNotNullParameter(elements, "elements");
filterNotNull = ArraysKt___ArraysKt.filterNotNull(elements);
return filterNotNull;
}
public static int getLastIndex(List list) {
Intrinsics.checkNotNullParameter(list, "<this>");
return list.size() - 1;
}
public static final List optimizeReadOnlyList(List list) {
Intrinsics.checkNotNullParameter(list, "<this>");
int size = list.size();
if (size != 0) {
return size != 1 ? list : CollectionsKt__CollectionsJVMKt.listOf(list.get(0));
}
return emptyList();
}
public static void throwIndexOverflow() {
throw new ArithmeticException("Index overflow has happened.");
}
public static void throwCountOverflow() {
throw new ArithmeticException("Count overflow has happened.");
}
}