Enum Constant and Description |
---|
FRIDAY
周五
|
MONDAY
周一
|
SATURDAY
周六
|
SUNDAY
周日
|
THURSDAY
周四
|
TUESDAY
周二
|
WEDNESDAY
周三
|
Modifier and Type | Method and Description |
---|---|
int |
getValue()
获得星期对应
Calendar 中的Week值 |
static Week |
of(int calendarWeekIntValue)
将
Calendar 星期相关值转换为Week枚举对象 |
String |
toChinese()
转换为中文名
|
String |
toChinese(String weekNamePre)
转换为中文名
|
static Week |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Week[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Week SUNDAY
public static final Week MONDAY
public static final Week TUESDAY
public static final Week WEDNESDAY
public static final Week THURSDAY
public static final Week FRIDAY
public static final Week SATURDAY
public static Week[] values()
for (Week c : Week.values()) System.out.println(c);
public static Week valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toChinese()
public String toChinese(String weekNamePre)
weekNamePre
- 表示星期的前缀,例如前缀为“星期”,则返回结果为“星期一”;前缀为”周“,结果为“周一”Copyright © 2021. All rights reserved.