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

148 lines
5.6 KiB
Java

package o;
import java.util.Locale;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.temporal.UnsupportedTemporalTypeException;
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Found several "values" enum fields: [] */
/* renamed from: o.gsk, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class EnumC15515gsk implements gtK, gtJ {
private static final EnumC15515gsk[] $VALUES;
private static final EnumC15515gsk[] ENUMS;
public static final EnumC15515gsk FRIDAY;
public static final gtQ<EnumC15515gsk> FROM;
public static final EnumC15515gsk MONDAY;
public static final EnumC15515gsk SATURDAY;
public static final EnumC15515gsk SUNDAY;
public static final EnumC15515gsk THURSDAY;
public static final EnumC15515gsk TUESDAY;
public static final EnumC15515gsk WEDNESDAY;
private EnumC15515gsk(String str, int i) {
}
public static EnumC15515gsk valueOf(String str) {
return (EnumC15515gsk) Enum.valueOf(EnumC15515gsk.class, str);
}
public static EnumC15515gsk[] values() {
return (EnumC15515gsk[]) $VALUES.clone();
}
static {
EnumC15515gsk enumC15515gsk = new EnumC15515gsk("MONDAY", 0);
MONDAY = enumC15515gsk;
EnumC15515gsk enumC15515gsk2 = new EnumC15515gsk("TUESDAY", 1);
TUESDAY = enumC15515gsk2;
EnumC15515gsk enumC15515gsk3 = new EnumC15515gsk("WEDNESDAY", 2);
WEDNESDAY = enumC15515gsk3;
EnumC15515gsk enumC15515gsk4 = new EnumC15515gsk("THURSDAY", 3);
THURSDAY = enumC15515gsk4;
EnumC15515gsk enumC15515gsk5 = new EnumC15515gsk("FRIDAY", 4);
FRIDAY = enumC15515gsk5;
EnumC15515gsk enumC15515gsk6 = new EnumC15515gsk("SATURDAY", 5);
SATURDAY = enumC15515gsk6;
EnumC15515gsk enumC15515gsk7 = new EnumC15515gsk("SUNDAY", 6);
SUNDAY = enumC15515gsk7;
$VALUES = new EnumC15515gsk[]{enumC15515gsk, enumC15515gsk2, enumC15515gsk3, enumC15515gsk4, enumC15515gsk5, enumC15515gsk6, enumC15515gsk7};
FROM = new gtQ<EnumC15515gsk>() { // from class: o.gsk.4
@Override // o.gtQ
public final EnumC15515gsk queryFrom(gtK gtk) {
return EnumC15515gsk.from(gtk);
}
};
ENUMS = values();
}
public static EnumC15515gsk of(int i) {
if (i <= 0 || i > 7) {
throw new DateTimeException("Invalid value for DayOfWeek: ".concat(String.valueOf(i)));
}
return ENUMS[i - 1];
}
public static EnumC15515gsk from(gtK gtk) {
if (gtk instanceof EnumC15515gsk) {
return (EnumC15515gsk) gtk;
}
try {
return of(gtk.get(EnumC15534gtD.DAY_OF_WEEK));
} catch (DateTimeException e) {
StringBuilder sb = new StringBuilder("Unable to obtain DayOfWeek from TemporalAccessor: ");
sb.append(gtk);
sb.append(", type ");
sb.append(gtk.getClass().getName());
throw new DateTimeException(sb.toString(), e);
}
}
public final int getValue() {
return ordinal() + 1;
}
public final String getDisplayName(EnumC15532gtB enumC15532gtB, Locale locale) {
return new C15553gtn().appendText(EnumC15534gtD.DAY_OF_WEEK, enumC15532gtB).toFormatter(locale).format(this);
}
@Override // o.gtK
public final boolean isSupported(InterfaceC15537gtP interfaceC15537gtP) {
return interfaceC15537gtP instanceof EnumC15534gtD ? interfaceC15537gtP == EnumC15534gtD.DAY_OF_WEEK : interfaceC15537gtP != null && interfaceC15537gtP.isSupportedBy(this);
}
@Override // o.gtK
public final gtT range(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP == EnumC15534gtD.DAY_OF_WEEK) {
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.DAY_OF_WEEK) {
return getValue();
}
return range(interfaceC15537gtP).checkValidIntValue(getLong(interfaceC15537gtP), interfaceC15537gtP);
}
@Override // o.gtK
public final long getLong(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP == EnumC15534gtD.DAY_OF_WEEK) {
return getValue();
}
if (interfaceC15537gtP instanceof EnumC15534gtD) {
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
return interfaceC15537gtP.getFrom(this);
}
public final EnumC15515gsk plus(long j) {
return ENUMS[(ordinal() + (((int) (j % 7)) + 7)) % 7];
}
public final EnumC15515gsk minus(long j) {
return plus(-(j % 7));
}
@Override // o.gtK
public final <R> R query(gtQ<R> gtq) {
if (gtq == gtM.precision()) {
return (R) gtH.DAYS;
}
if (gtq == gtM.localDate() || gtq == gtM.localTime() || gtq == gtM.chronology() || gtq == gtM.zone() || gtq == gtM.zoneId() || gtq == gtM.offset()) {
return null;
}
return gtq.queryFrom(this);
}
@Override // o.gtJ
public final InterfaceC15536gtL adjustInto(InterfaceC15536gtL interfaceC15536gtL) {
return interfaceC15536gtL.with(EnumC15534gtD.DAY_OF_WEEK, getValue());
}
}