- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
1.2 KiB
Java
34 lines
1.2 KiB
Java
package kotlin.collections;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class CollectionsKt__IterablesKt extends CollectionsKt__CollectionsKt {
|
|
public static final Integer collectionSizeOrNull(Iterable iterable) {
|
|
Intrinsics.checkNotNullParameter(iterable, "<this>");
|
|
if (iterable instanceof Collection) {
|
|
return Integer.valueOf(((Collection) iterable).size());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static int collectionSizeOrDefault(Iterable iterable, int i) {
|
|
Intrinsics.checkNotNullParameter(iterable, "<this>");
|
|
return iterable instanceof Collection ? ((Collection) iterable).size() : i;
|
|
}
|
|
|
|
public static List flatten(Iterable iterable) {
|
|
Intrinsics.checkNotNullParameter(iterable, "<this>");
|
|
ArrayList arrayList = new ArrayList();
|
|
Iterator it = iterable.iterator();
|
|
while (it.hasNext()) {
|
|
CollectionsKt__MutableCollectionsKt.addAll(arrayList, (Iterable) it.next());
|
|
}
|
|
return arrayList;
|
|
}
|
|
}
|