what-the-bank/sources/o/C14857gaQ.java

99 lines
3.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/* renamed from: o.gaQ, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C14857gaQ extends C14855gaN {
public static final <K, V> Map<K, V> b(C13396fZU<? extends K, ? extends V>... c13396fZUArr) {
C14957gcv.e(c13396fZUArr, "");
if (c13396fZUArr.length > 0) {
LinkedHashMap linkedHashMap = new LinkedHashMap(C14856gaP.a(c13396fZUArr.length));
C14957gcv.e(c13396fZUArr, "");
C14957gcv.e(linkedHashMap, "");
C14856gaP.e(linkedHashMap, c13396fZUArr);
return linkedHashMap;
}
C14854gaM c14854gaM = C14854gaM.c;
C14957gcv.d(c14854gaM, "");
return c14854gaM;
}
public static final <K, V> void e(Map<? super K, ? super V> map, C13396fZU<? extends K, ? extends V>[] c13396fZUArr) {
C14957gcv.e(map, "");
C14957gcv.e(c13396fZUArr, "");
for (C13396fZU<? extends K, ? extends V> c13396fZU : c13396fZUArr) {
map.put((Object) c13396fZU.d, (Object) c13396fZU.e);
}
}
public static final <K, V> void d(Map<? super K, ? super V> map, Iterable<? extends C13396fZU<? extends K, ? extends V>> iterable) {
C14957gcv.e(map, "");
C14957gcv.e(iterable, "");
for (C13396fZU<? extends K, ? extends V> c13396fZU : iterable) {
map.put((Object) c13396fZU.d, (Object) c13396fZU.e);
}
}
public static final <K, V> Map<K, V> c(Iterable<? extends C13396fZU<? extends K, ? extends V>> iterable) {
C14957gcv.e(iterable, "");
if (iterable instanceof Collection) {
Collection collection = (Collection) iterable;
int size = collection.size();
if (size == 0) {
C14854gaM c14854gaM = C14854gaM.c;
C14957gcv.d(c14854gaM, "");
return c14854gaM;
}
if (size == 1) {
C13396fZU next = iterable instanceof List ? (C13396fZU<? extends K, ? extends V>) ((List) iterable).get(0) : iterable.iterator().next();
C14957gcv.e(next, "");
Map<K, V> singletonMap = Collections.singletonMap(next.d, next.e);
C14957gcv.c(singletonMap, "");
return singletonMap;
}
LinkedHashMap linkedHashMap = new LinkedHashMap(C14856gaP.a(collection.size()));
C14957gcv.e(iterable, "");
C14957gcv.e(linkedHashMap, "");
C14856gaP.d(linkedHashMap, iterable);
return linkedHashMap;
}
LinkedHashMap linkedHashMap2 = new LinkedHashMap();
C14957gcv.e(iterable, "");
C14957gcv.e(linkedHashMap2, "");
C14856gaP.d(linkedHashMap2, iterable);
return C14856gaP.d(linkedHashMap2);
}
public static final <K, V> Map<K, V> c(Map<? extends K, ? extends V> map) {
C14957gcv.e(map, "");
int size = map.size();
if (size == 0) {
C14854gaM c14854gaM = C14854gaM.c;
C14957gcv.d(c14854gaM, "");
return c14854gaM;
}
if (size == 1) {
return C14856gaP.a(map);
}
C14957gcv.e(map, "");
return new LinkedHashMap(map);
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V> Map<K, V> d(Map<K, ? extends V> map) {
C14957gcv.e(map, "");
int size = map.size();
if (size != 0) {
return size == 1 ? C14856gaP.a(map) : map;
}
C14854gaM c14854gaM = C14854gaM.c;
C14957gcv.d(c14854gaM, "");
return c14854gaM;
}
}