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

84 lines
2.8 KiB
Java

package o;
import java.util.Locale;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.temporal.UnsupportedTemporalTypeException;
/* renamed from: o.gtb, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public enum EnumC15541gtb implements gsY {
BCE,
CE;
public static EnumC15541gtb of(int i) {
if (i == 0) {
return BCE;
}
if (i == 1) {
return CE;
}
throw new DateTimeException("Invalid era: ".concat(String.valueOf(i)));
}
@Override // o.gsY
public final int getValue() {
return ordinal();
}
@Override // o.gtK
public final boolean isSupported(InterfaceC15537gtP interfaceC15537gtP) {
return interfaceC15537gtP instanceof EnumC15534gtD ? interfaceC15537gtP == EnumC15534gtD.ERA : interfaceC15537gtP != null && interfaceC15537gtP.isSupportedBy(this);
}
@Override // o.gtK
public final gtT range(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP == EnumC15534gtD.ERA) {
return interfaceC15537gtP.range();
}
if (interfaceC15537gtP instanceof EnumC15534gtD) {
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
return interfaceC15537gtP.rangeRefinedBy(this);
}
@Override // o.gtK
public final int get(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP == EnumC15534gtD.ERA) {
return getValue();
}
return range(interfaceC15537gtP).checkValidIntValue(getLong(interfaceC15537gtP), interfaceC15537gtP);
}
@Override // o.gtK
public final long getLong(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP == EnumC15534gtD.ERA) {
return getValue();
}
if (interfaceC15537gtP instanceof EnumC15534gtD) {
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
return interfaceC15537gtP.getFrom(this);
}
@Override // o.gtJ
public final InterfaceC15536gtL adjustInto(InterfaceC15536gtL interfaceC15536gtL) {
return interfaceC15536gtL.with(EnumC15534gtD.ERA, getValue());
}
@Override // o.gtK
public final <R> R query(gtQ<R> gtq) {
if (gtq == gtM.precision()) {
return (R) gtH.ERAS;
}
if (gtq == gtM.chronology() || gtq == gtM.zone() || gtq == gtM.zoneId() || gtq == gtM.offset() || gtq == gtM.localDate() || gtq == gtM.localTime()) {
return null;
}
return gtq.queryFrom(this);
}
@Override // o.gsY
public final String getDisplayName(EnumC15532gtB enumC15532gtB, Locale locale) {
return new C15553gtn().appendText(EnumC15534gtD.ERA, enumC15532gtB).toFormatter(locale).format(this);
}
}