101 lines
3.0 KiB
Java
101 lines
3.0 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.sys;
|
|
|
|
import javax.baja.sys.BFrozenEnum;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.Lexicon;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public final class BWeekday
|
|
extends BFrozenEnum {
|
|
public static final int SUNDAY = 0;
|
|
public static final int MONDAY = 1;
|
|
public static final int TUESDAY = 2;
|
|
public static final int WEDNESDAY = 3;
|
|
public static final int THURSDAY = 4;
|
|
public static final int FRIDAY = 5;
|
|
public static final int SATURDAY = 6;
|
|
public static final BWeekday sunday = new BWeekday(0);
|
|
public static final BWeekday monday = new BWeekday(1);
|
|
public static final BWeekday tuesday = new BWeekday(2);
|
|
public static final BWeekday wednesday = new BWeekday(3);
|
|
public static final BWeekday thursday = new BWeekday(4);
|
|
public static final BWeekday friday = new BWeekday(5);
|
|
public static final BWeekday saturday = new BWeekday(6);
|
|
public static final Type TYPE;
|
|
public static final BWeekday DEFAULT;
|
|
static /* synthetic */ Class class$javax$baja$sys$BWeekday;
|
|
|
|
public final Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static final BWeekday make(int n) {
|
|
return (BWeekday)sunday.getRange().get(n, false);
|
|
}
|
|
|
|
public static final BWeekday make(String string) {
|
|
return (BWeekday)sunday.getRange().get(string);
|
|
}
|
|
|
|
public static final BWeekday getFirstDayOfWeek(Context context) {
|
|
Lexicon lexicon = Lexicon.make(TYPE.getModule(), context);
|
|
String string = lexicon.get("weekday.firstDayOfWeek", null);
|
|
if (string == null) {
|
|
return sunday;
|
|
}
|
|
return BWeekday.make(string);
|
|
}
|
|
|
|
public final String getShortDisplayTag(Context context) {
|
|
return Lexicon.make(Sys.getBajaModule(), context).getText(this.getTag() + ".short");
|
|
}
|
|
|
|
public final BWeekday next() {
|
|
int n = this.getOrdinal();
|
|
n = (n + 1) % 7;
|
|
return BWeekday.make(n);
|
|
}
|
|
|
|
public final BWeekday previous() {
|
|
int n = this.getOrdinal();
|
|
if (--n == -1) {
|
|
n = 6;
|
|
}
|
|
return BWeekday.make(n);
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
private BWeekday(int n) {
|
|
super(n);
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$sys$BWeekday;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$sys$BWeekday = BWeekday.class("[Ljavax.baja.sys.BWeekday;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
DEFAULT = sunday;
|
|
}
|
|
}
|
|
|