public enum CalendarMonth extends Enum<CalendarMonth> implements CalendarFieldEnum<CalendarMonth,Integer>
Calendar.MONTH.| Enum Constant and Description |
|---|
APRIL |
AUGUST |
DECEMBER |
FEBRUARY |
JANUARY |
JULY |
JUNE |
MARCH |
MAY |
NOVEMBER |
OCTOBER |
SEPTEMBER |
| Modifier and Type | Field and Description |
|---|---|
static int |
CALENDAR_FIELD
The target field of
Calendar which this enum type is for. |
| Modifier and Type | Method and Description |
|---|---|
Integer[] |
fieldValues()
Returns an array containing the field values of this enum type, in order
they are declared.
|
static CalendarMonth |
fromCalendar(Calendar calendar)
Returns the enum constant of this type with the specified calendar's
field value.
|
static CalendarMonth |
fromFieldValue(int fieldValue)
Returns the enum constant of this type with the specified field value.
|
Integer |
getFieldValue()
Returns field value.
|
void |
set(Calendar calendar) |
static CalendarMonth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CalendarMonth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CalendarMonth JANUARY
public static final CalendarMonth FEBRUARY
public static final CalendarMonth MARCH
public static final CalendarMonth APRIL
public static final CalendarMonth MAY
public static final CalendarMonth JUNE
public static final CalendarMonth JULY
public static final CalendarMonth AUGUST
public static final CalendarMonth SEPTEMBER
public static final CalendarMonth OCTOBER
public static final CalendarMonth NOVEMBER
public static final CalendarMonth DECEMBER
public static final int CALENDAR_FIELD
Calendar which this enum type is for.Calendar.MONTH,
Constant Field Valuespublic static CalendarMonth[] values()
for (CalendarMonth c : CalendarMonth.values()) System.out.println(c);
public static CalendarMonth 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 static CalendarMonth fromFieldValue(int fieldValue)
fieldValue - field valueIllegalArgumentException - if this enum type has no constant with
the specified field value.public static CalendarMonth fromCalendar(Calendar calendar)
calendar - calendarIllegalArgumentException - if this enum type has no constant with
the specified calendar's field value.public Integer[] fieldValues()
public Integer getFieldValue()
FieldEnumgetFieldValue in interface FieldEnum<CalendarMonth,Integer>public void set(Calendar calendar)
set in interface CalendarFieldEnum<CalendarMonth,Integer>Copyright © 2011-2013. All Rights Reserved.