Package com.helger.commons.locale
Enum ELocaleName
- java.lang.Object
-
- java.lang.Enum<ELocaleName>
-
- com.helger.commons.locale.ELocaleName
-
- All Implemented Interfaces:
IHasDisplayText,Serializable,Comparable<ELocaleName>
@Translatable public enum ELocaleName extends Enum<ELocaleName> implements IHasDisplayText
Special locale names that are not part of the Java runtime.- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ID_LANGUAGE_ALLID_LANGUAGE_INDEPENDENT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDisplayText(Locale aContentLocale)static ELocaleNamevalueOf(String name)Returns the enum constant of this type with the specified name.static ELocaleName[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.helger.commons.text.display.IHasDisplayText
getAsHasText
-
-
-
-
Enum Constant Detail
-
ID_LANGUAGE_ALL
public static final ELocaleName ID_LANGUAGE_ALL
-
ID_LANGUAGE_INDEPENDENT
public static final ELocaleName ID_LANGUAGE_INDEPENDENT
-
-
Method Detail
-
values
public static ELocaleName[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ELocaleName c : ELocaleName.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ELocaleName valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayText
@Nullable public String getDisplayText(@Nonnull Locale aContentLocale)
- Specified by:
getDisplayTextin interfaceIHasDisplayText- Parameters:
aContentLocale- The locale to be used for resolving. May not benull.- Returns:
- The display text of the object in the given locale. May be
nullif the text could not be resolved in the passed locale.
-
-