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

140 lines
4.1 KiB
Java

package o;
import com.bumptech.glide.Registry;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import o.RDy;
import o.SCe;
/* loaded from: classes.dex */
public final class Vzp {
private final Set<RVV<?, ?>> a;
private final Sts c;
public final List<RVV<?, ?>> d;
private final RDy.Sts<List<Throwable>> h;
private static final Sts e = new Sts();
private static final SCe<Object, Object> b = new LWm();
public Vzp(RDy.Sts<List<Throwable>> sts) {
this(sts, e);
}
private Vzp(RDy.Sts<List<Throwable>> sts, Sts sts2) {
this.d = new ArrayList();
this.a = new HashSet();
this.h = sts;
this.c = sts2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final <Model> List<SCe<Model, ?>> c(Class<Model> cls) {
ArrayList arrayList;
synchronized (this) {
try {
arrayList = new ArrayList();
for (RVV<?, ?> rvv : this.d) {
if (!this.a.contains(rvv) && rvv.e.isAssignableFrom(cls)) {
this.a.add(rvv);
arrayList.add(b(rvv));
this.a.remove(rvv);
}
}
} catch (Throwable th) {
this.a.clear();
throw th;
}
}
return arrayList;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final List<Class<?>> d(Class<?> cls) {
ArrayList arrayList;
synchronized (this) {
arrayList = new ArrayList();
for (RVV<?, ?> rvv : this.d) {
if (!arrayList.contains(rvv.b) && rvv.e.isAssignableFrom(cls)) {
arrayList.add(rvv.b);
}
}
}
return arrayList;
}
public final <Model, Data> SCe<Model, Data> b(Class<Model> cls, Class<Data> cls2) {
synchronized (this) {
try {
ArrayList arrayList = new ArrayList();
boolean z = false;
for (RVV<?, ?> rvv : this.d) {
if (this.a.contains(rvv)) {
z = true;
} else if (rvv.e.isAssignableFrom(cls) && rvv.b.isAssignableFrom(cls2)) {
this.a.add(rvv);
arrayList.add(b(rvv));
this.a.remove(rvv);
}
}
if (arrayList.size() <= 1) {
if (arrayList.size() == 1) {
return (SCe) arrayList.get(0);
}
if (!z) {
throw new Registry.NoModelLoaderAvailableException((Class<?>) cls, (Class<?>) cls2);
}
return (SCe<Model, Data>) b;
}
return new C11467efr(arrayList, this.h);
} catch (Throwable th) {
this.a.clear();
throw th;
}
}
}
private <Model, Data> SCe<Model, Data> b(RVV<?, ?> rvv) {
SCe c = rvv.d.c(this);
if (c != null) {
return c;
}
throw new NullPointerException("Argument must not be null");
}
/* loaded from: classes.dex */
public static class RVV<Model, Data> {
final Class<Data> b;
final rIx<? extends Model, ? extends Data> d;
final Class<Model> e;
public RVV(Class<Model> cls, Class<Data> cls2, rIx<? extends Model, ? extends Data> rix) {
this.e = cls;
this.b = cls2;
this.d = rix;
}
}
/* loaded from: classes.dex */
static class Sts {
Sts() {
}
}
/* loaded from: classes.dex */
static class LWm implements SCe<Object, Object> {
@Override // o.SCe
public final boolean d(Object obj) {
return false;
}
@Override // o.SCe
public final SCe.IeS<Object> e(Object obj, int i, int i2, unA una) {
return null;
}
LWm() {
}
}
}