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

84 lines
2.4 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public final class KFY {
public final List<String> c = new ArrayList();
private final Map<String, List<IeS<?, ?>>> d = new HashMap();
public final <T, R> List<iYP<T, R>> a(Class<T> cls, Class<R> cls2) {
ArrayList arrayList;
synchronized (this) {
arrayList = new ArrayList();
Iterator<String> it = this.c.iterator();
while (it.hasNext()) {
List<IeS<?, ?>> list = this.d.get(it.next());
if (list != null) {
for (IeS<?, ?> ieS : list) {
if (ieS.d(cls, cls2)) {
arrayList.add(ieS.c);
}
}
}
}
}
return arrayList;
}
public final <T, R> List<Class<R>> d(Class<T> cls, Class<R> cls2) {
ArrayList arrayList;
synchronized (this) {
arrayList = new ArrayList();
Iterator<String> it = this.c.iterator();
while (it.hasNext()) {
List<IeS<?, ?>> list = this.d.get(it.next());
if (list != null) {
for (IeS<?, ?> ieS : list) {
if (ieS.d(cls, cls2) && !arrayList.contains(ieS.e)) {
arrayList.add(ieS.e);
}
}
}
}
}
return arrayList;
}
public final List<IeS<?, ?>> a(String str) {
List<IeS<?, ?>> list;
synchronized (this) {
if (!this.c.contains(str)) {
this.c.add(str);
}
list = this.d.get(str);
if (list == null) {
list = new ArrayList<>();
this.d.put(str, list);
}
}
return list;
}
/* loaded from: classes.dex */
public static class IeS<T, R> {
private final Class<T> b;
final iYP<T, R> c;
final Class<R> e;
public IeS(Class<T> cls, Class<R> cls2, iYP<T, R> iyp) {
this.b = cls;
this.e = cls2;
this.c = iyp;
}
public final boolean d(Class<?> cls, Class<?> cls2) {
return this.b.isAssignableFrom(cls) && cls2.isAssignableFrom(this.e);
}
}
}