public enum CalendarPeriodOfDay extends Enum<CalendarPeriodOfDay> implements CalendarFieldEnum<CalendarPeriodOfDay,Integer>
Calendar.AM_PM.| Enum Constant and Description |
|---|
AM
Constant for
Calendar.AM. |
PM
Constant for
Calendar.PM. |
| 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 CalendarPeriodOfDay |
fromCalendar(Calendar calendar)
Returns the enum constant of this type with the specified calendar's
field value.
|
static CalendarPeriodOfDay |
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 CalendarPeriodOfDay |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CalendarPeriodOfDay[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CalendarPeriodOfDay AM
Calendar.AM.public static final CalendarPeriodOfDay PM
Calendar.PM.public static final int CALENDAR_FIELD
Calendar which this enum type is for.Calendar.AM_PM,
Constant Field Valuespublic static CalendarPeriodOfDay[] values()
for (CalendarPeriodOfDay c : CalendarPeriodOfDay.values()) System.out.println(c);
public static CalendarPeriodOfDay 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 CalendarPeriodOfDay fromFieldValue(int fieldValue)
fieldValue - field valueIllegalArgumentException - if this enum type has no constant with
the specified field value.public static CalendarPeriodOfDay 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<CalendarPeriodOfDay,Integer>public void set(Calendar calendar)
set in interface CalendarFieldEnum<CalendarPeriodOfDay,Integer>Copyright © 2011-2013. All Rights Reserved.