@Status(stage=PRODUCTION, unitTests=COMPLETE) @Review(by="Kees Schotanus", at="2009-09-28") public enum WeekDay extends Enum<WeekDay> implements LocalizableEnumeration
Enum Constant and Description |
---|
FRIDAY
Friday.
|
MONDAY
Monday.
|
SATURDAY
Saturday.
|
SUNDAY
Sunday.
|
THURSDAY
Thursday.
|
TUESDAY
Tuesday.
|
WEDNESDAY
Wednesday.
|
Modifier and Type | Field and Description |
---|---|
static int |
DAYS_IN_WEEK
The number of days in a week.
|
Modifier and Type | Method and Description |
---|---|
Serializable |
getCode()
Gets the code of this WeekDay.
|
CodeDescription |
getCodeDescription(Locale locale)
Gets the CodeDescription of this WeekDay.
|
static List<CodeDescription> |
getCodeDescriptions(Locale locale)
Gets a List of
CodeDescription objects for all the WeekDays. |
String |
getDescription(Locale locale)
Gets the localized description of this WeekDay.
|
String |
toLocalizedShortString(Locale locale)
Creates a localized short String representation of this WeekDay.
|
String |
toLocalizedString(Locale locale)
Creates a localized String representation of this WeekDay.
|
static WeekDay |
valueOf(int day)
Gets the Day corresponding to the supplied integer day.
|
static WeekDay |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WeekDay[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WeekDay SUNDAY
public static final WeekDay MONDAY
public static final WeekDay TUESDAY
public static final WeekDay WEDNESDAY
public static final WeekDay THURSDAY
public static final WeekDay FRIDAY
public static final WeekDay SATURDAY
public static final int DAYS_IN_WEEK
public static WeekDay[] values()
for (WeekDay c : WeekDay.values()) System.out.println(c);
public static WeekDay 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 WeekDay valueOf(int day)
day
- The integer day from 1 (Sunday) to 7 (Saturday).IllegalArgumentException
- When no WeekDay exists that corresponds
to the supplied day.
public String toLocalizedString(Locale locale)
locale
- Locale to localize this WeekDay.
public String toLocalizedShortString(Locale locale)
locale
- Locale to localize this WeekDay.
public Serializable getCode()
getCode
in interface LocalizableEnumeration
public String getDescription(Locale locale)
getDescription
in interface Localizable
getDescription
in interface LocalizableEnumeration
locale
- Locale used to localize the description.
toLocalizedString(Locale)
public CodeDescription getCodeDescription(Locale locale)
getCodeDescription
in interface LocalizableEnumeration
locale
- Locale used to localize the description.
public static List<CodeDescription> getCodeDescriptions(Locale locale)
CodeDescription
objects for all the WeekDays.locale
- Locale used to localize the descriptions.
CodeDescription
objects for all the WeekDays.Copyright © 2008–2018. All rights reserved.