@Status(stage=PRODUCTION, unitTests=ABSENT) @Review(by="Kees Schotanus", at="2009-09-28") public enum Planet extends Enum<Planet> implements LocalizableEnumeration
LocalizableEnumeration
and it has the accompanying properties files.Enum Constant and Description |
---|
EARTH
Earth.
|
JUPITER
Jupiter.
|
MARS
Mars.
|
MERCURY
Mercury.
|
NEPTUNE
Neptune.
|
SATURN
Saturn.
|
URANUS
Uranus.
|
VENUS
Venus.
|
Modifier and Type | Method and Description |
---|---|
Serializable |
getCode()
Gets the code of this Planet.
|
CodeDescription |
getCodeDescription(Locale locale)
Gets the CodeDescription of this Planet.
|
static List<CodeDescription> |
getCodeDescriptions(Locale locale)
Gets a List of
CodeDescription objects for all the Planets. |
String |
getDescription(Locale locale)
Gets the localized description of this Planet.
|
static String |
getEnumDescription(Locale locale)
Gets the description of this enumeration of planets.
|
static Planet |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Planet[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Planet MERCURY
public static final Planet VENUS
public static final Planet EARTH
public static final Planet MARS
public static final Planet JUPITER
public static final Planet SATURN
public static final Planet URANUS
public static final Planet NEPTUNE
public static Planet[] values()
for (Planet c : Planet.values()) System.out.println(c);
public static Planet 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 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.
public CodeDescription getCodeDescription(Locale locale)
getCodeDescription
in interface LocalizableEnumeration
locale
- Locale used to localize the description.
public static String getEnumDescription(Locale locale)
locale
- Locale used to localize the description.
CEnumeration.getDescription(Class, Locale)
public static List<CodeDescription> getCodeDescriptions(Locale locale)
CodeDescription
objects for all the Planets.locale
- Locale used to localize the descriptions.
CodeDescription
objects for all the Planets.CEnumeration.getCodeDescriptions(Class, Locale)
Copyright © 2008–2018. All rights reserved.