CrackMe.apk
Download file
package kotlin.reflect.jvm.internal.impl.utils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: collections.kt */
public final class CollectionsKt {
public static final <K> Map<K, Integer> mapToIndex(Iterable<? extends K> iterable) {
Intrinsics.checkNotNullParameter(iterable, "<this>");
LinkedHashMap linkedHashMap = new LinkedHashMap();
int i = 0;
for (Object put : iterable) {
linkedHashMap.put(put, Integer.valueOf(i));
i++;
}
return linkedHashMap;
}
public static final <T> void addIfNotNull(Collection<T> collection, T t) {
Intrinsics.checkNotNullParameter(collection, "<this>");
if (t != null) {
collection.add(t);
}
}
public static final <K, V> HashMap<K, V> newHashMapWithExpectedSize(int i) {
return new HashMap<>(capacity(i));
}
public static final <E> HashSet<E> newHashSetWithExpectedSize(int i) {
return new HashSet<>(capacity(i));
}
public static final <E> LinkedHashSet<E> newLinkedHashSetWithExpectedSize(int i) {
return new LinkedHashSet<>(capacity(i));
}
private static final int capacity(int i) {
if (i < 3) {
return 3;
}
return i + (i / 3) + 1;
}
public static final <T> List<T> compact(ArrayList<T> arrayList) {
Intrinsics.checkNotNullParameter(arrayList, "<this>");
int size = arrayList.size();
if (size == 0) {
return kotlin.collections.CollectionsKt.emptyList();
}
if (size == 1) {
return kotlin.collections.CollectionsKt.listOf(kotlin.collections.CollectionsKt.first(arrayList));
}
arrayList.trimToSize();
return arrayList;
}
}
Download file