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

72 lines
2.0 KiB
Java

package o;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import o.Box;
/* renamed from: o.iRy, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C15764iRy {
private static final Box.HBt<?> b = new Box.HBt<Object>() { // from class: o.iRy.2
@Override // o.Box.HBt
public final Box<Object> b(Object obj) {
return new HBt(obj);
}
@Override // o.Box.HBt
public final Class<Object> a() {
throw new UnsupportedOperationException("Not implemented");
}
};
public final Map<Class<?>, Box.HBt<?>> d = new HashMap();
/* renamed from: o.iRy$HBt */
/* loaded from: classes.dex */
static final class HBt implements Box<Object> {
private final Object a;
@Override // o.Box
public final void b() {
}
HBt(Object obj) {
this.a = obj;
}
@Override // o.Box
public final Object a() {
return this.a;
}
}
public final <T> Box<T> d(T t) {
Box<T> box;
synchronized (this) {
if (t != null) {
Box.HBt<?> hBt = this.d.get(t.getClass());
if (hBt == null) {
Iterator<Box.HBt<?>> it = this.d.values().iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Box.HBt<?> next = it.next();
if (next.a().isAssignableFrom(t.getClass())) {
hBt = next;
break;
}
}
}
if (hBt == null) {
hBt = b;
}
box = (Box<T>) hBt.b(t);
} else {
throw new NullPointerException("Argument must not be null");
}
}
return box;
}
}