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

62 lines
1.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.text.Format;
import java.util.Arrays;
import java.util.Locale;
import java.util.Objects;
import java.util.TimeZone;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/* renamed from: o.gjV, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
abstract class AbstractC15179gjV<F extends Format> {
private final ConcurrentMap<HBt, F> a = new ConcurrentHashMap(7);
protected abstract F a(String str, TimeZone timeZone, Locale locale);
static {
new ConcurrentHashMap(7);
}
/* renamed from: o.gjV$HBt */
/* loaded from: classes6.dex */
static final class HBt {
private final int b;
private final Object[] d;
HBt(Object... objArr) {
this.d = objArr;
this.b = Arrays.hashCode(objArr) + 31;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null && getClass() == obj.getClass()) {
return Arrays.deepEquals(this.d, ((HBt) obj).d);
}
return false;
}
public final int hashCode() {
return this.b;
}
}
public final F c(String str, Locale locale) {
Objects.requireNonNull(str, new gjM("pattern", new Object[0]));
TimeZone timeZone = TimeZone.getDefault();
Locale b = gjH.b(locale);
HBt hBt = new HBt(str, timeZone, b);
F f = this.a.get(hBt);
if (f != null) {
return f;
}
F a = a(str, timeZone, b);
F putIfAbsent = this.a.putIfAbsent(hBt, a);
return putIfAbsent != null ? putIfAbsent : a;
}
}