- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
200 lines
7.0 KiB
Java
200 lines
7.0 KiB
Java
package kotlin.collections;
|
|
|
|
import java.util.Collection;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import kotlin.Pair;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.sequences.Sequence;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class MapsKt__MapsKt extends MapsKt__MapsJVMKt {
|
|
public static Map emptyMap() {
|
|
EmptyMap emptyMap = EmptyMap.INSTANCE;
|
|
Intrinsics.checkNotNull(emptyMap, "null cannot be cast to non-null type kotlin.collections.Map<K of kotlin.collections.MapsKt__MapsKt.emptyMap, V of kotlin.collections.MapsKt__MapsKt.emptyMap>");
|
|
return emptyMap;
|
|
}
|
|
|
|
public static Map mapOf(Pair... pairs) {
|
|
Map emptyMap;
|
|
int mapCapacity;
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
if (pairs.length > 0) {
|
|
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(pairs.length);
|
|
return toMap(pairs, new LinkedHashMap(mapCapacity));
|
|
}
|
|
emptyMap = emptyMap();
|
|
return emptyMap;
|
|
}
|
|
|
|
public static Map mutableMapOf(Pair... pairs) {
|
|
int mapCapacity;
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(pairs.length);
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap(mapCapacity);
|
|
putAll(linkedHashMap, pairs);
|
|
return linkedHashMap;
|
|
}
|
|
|
|
public static HashMap hashMapOf(Pair... pairs) {
|
|
int mapCapacity;
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(pairs.length);
|
|
HashMap hashMap = new HashMap(mapCapacity);
|
|
putAll(hashMap, pairs);
|
|
return hashMap;
|
|
}
|
|
|
|
public static LinkedHashMap linkedMapOf(Pair... pairs) {
|
|
int mapCapacity;
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(pairs.length);
|
|
return (LinkedHashMap) toMap(pairs, new LinkedHashMap(mapCapacity));
|
|
}
|
|
|
|
public static Object getValue(Map map, Object obj) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
return MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(map, obj);
|
|
}
|
|
|
|
public static final void putAll(Map map, Pair[] pairs) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
for (Pair pair : pairs) {
|
|
map.put(pair.component1(), pair.component2());
|
|
}
|
|
}
|
|
|
|
public static final void putAll(Map map, Iterable pairs) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
Iterator it = pairs.iterator();
|
|
while (it.hasNext()) {
|
|
Pair pair = (Pair) it.next();
|
|
map.put(pair.component1(), pair.component2());
|
|
}
|
|
}
|
|
|
|
public static final void putAll(Map map, Sequence pairs) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
Intrinsics.checkNotNullParameter(pairs, "pairs");
|
|
Iterator it = pairs.iterator();
|
|
while (it.hasNext()) {
|
|
Pair pair = (Pair) it.next();
|
|
map.put(pair.component1(), pair.component2());
|
|
}
|
|
}
|
|
|
|
public static Map toMap(Iterable iterable) {
|
|
Map emptyMap;
|
|
Map mapOf;
|
|
int mapCapacity;
|
|
Intrinsics.checkNotNullParameter(iterable, "<this>");
|
|
if (iterable instanceof Collection) {
|
|
Collection collection = (Collection) iterable;
|
|
int size = collection.size();
|
|
if (size == 0) {
|
|
emptyMap = emptyMap();
|
|
return emptyMap;
|
|
}
|
|
if (size != 1) {
|
|
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(collection.size());
|
|
return toMap(iterable, new LinkedHashMap(mapCapacity));
|
|
}
|
|
mapOf = MapsKt__MapsJVMKt.mapOf((Pair) (iterable instanceof List ? ((List) iterable).get(0) : iterable.iterator().next()));
|
|
return mapOf;
|
|
}
|
|
return optimizeReadOnlyMap(toMap(iterable, new LinkedHashMap()));
|
|
}
|
|
|
|
public static final Map toMap(Iterable iterable, Map destination) {
|
|
Intrinsics.checkNotNullParameter(iterable, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
putAll(destination, iterable);
|
|
return destination;
|
|
}
|
|
|
|
public static final Map toMap(Pair[] pairArr, Map destination) {
|
|
Intrinsics.checkNotNullParameter(pairArr, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
putAll(destination, pairArr);
|
|
return destination;
|
|
}
|
|
|
|
public static Map toMap(Sequence sequence) {
|
|
Intrinsics.checkNotNullParameter(sequence, "<this>");
|
|
return optimizeReadOnlyMap(toMap(sequence, new LinkedHashMap()));
|
|
}
|
|
|
|
public static final Map toMap(Sequence sequence, Map destination) {
|
|
Intrinsics.checkNotNullParameter(sequence, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
putAll(destination, sequence);
|
|
return destination;
|
|
}
|
|
|
|
public static Map toMap(Map map) {
|
|
Map emptyMap;
|
|
Map mutableMap;
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
int size = map.size();
|
|
if (size == 0) {
|
|
emptyMap = emptyMap();
|
|
return emptyMap;
|
|
}
|
|
if (size == 1) {
|
|
return MapsKt__MapsJVMKt.toSingletonMap(map);
|
|
}
|
|
mutableMap = toMutableMap(map);
|
|
return mutableMap;
|
|
}
|
|
|
|
public static Map toMutableMap(Map map) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
return new LinkedHashMap(map);
|
|
}
|
|
|
|
public static Map plus(Map map, Pair pair) {
|
|
Map mapOf;
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
Intrinsics.checkNotNullParameter(pair, "pair");
|
|
if (map.isEmpty()) {
|
|
mapOf = MapsKt__MapsJVMKt.mapOf(pair);
|
|
return mapOf;
|
|
}
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap(map);
|
|
linkedHashMap.put(pair.getFirst(), pair.getSecond());
|
|
return linkedHashMap;
|
|
}
|
|
|
|
public static Map plus(Map map, Map map2) {
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
Intrinsics.checkNotNullParameter(map2, "map");
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap(map);
|
|
linkedHashMap.putAll(map2);
|
|
return linkedHashMap;
|
|
}
|
|
|
|
public static Map minus(Map map, Object obj) {
|
|
Map mutableMap;
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
mutableMap = toMutableMap(map);
|
|
mutableMap.remove(obj);
|
|
return optimizeReadOnlyMap(mutableMap);
|
|
}
|
|
|
|
public static final Map optimizeReadOnlyMap(Map map) {
|
|
Map emptyMap;
|
|
Intrinsics.checkNotNullParameter(map, "<this>");
|
|
int size = map.size();
|
|
if (size != 0) {
|
|
return size != 1 ? map : MapsKt__MapsJVMKt.toSingletonMap(map);
|
|
}
|
|
emptyMap = emptyMap();
|
|
return emptyMap;
|
|
}
|
|
}
|