Modifier and Type | Method and Description |
---|---|
static java.util.Optional<Language> |
of(java.util.Locale locale)
Returns an
Optional that contains the Language for the given Locale
or an empty Optional if there is no Language associated with the language
obtained from the given Locale . |
java.lang.String |
toString()
Returns a string representation of the current language in format:
|
static Language |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Language[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Language AMHARIC
public static final Language AFRIKAANS
public static final Language BULGARIAN
public static final Language BENGALI
public static final Language CATALAN
public static final Language CZECH
public static final Language DANISH
public static final Language GERMAN
public static final Language GREEK
public static final Language ENGLISH_US
public static final Language ENGLISH_UK
public static final Language SPANISH_LATIN_AMERICA
public static final Language SPANISH_SPAIN
public static final Language ESTONIAN
public static final Language FINNISH
public static final Language FILIPINO
public static final Language FRENCH
public static final Language GUJARATI
public static final Language HEBREW
public static final Language HINDI
public static final Language CROATIAN
public static final Language HUNGARIAN
public static final Language INDONESIAN
public static final Language ITALIAN
public static final Language JAPANESE
public static final Language KANNADA
public static final Language KOREAN
public static final Language LITHUANIAN
public static final Language LATVIAN
public static final Language MALAYALAM
public static final Language MARATHI
public static final Language MALAY
public static final Language NORWEGIAN
public static final Language DUTCH
public static final Language POLISH
public static final Language PORTUGUESE_BRAZIL
public static final Language PORTUGUESE_PORTUGAL
public static final Language ROMANIAN
public static final Language RUSSIAN
public static final Language SLOVAK
public static final Language SLOVENIAN
public static final Language SERBIAN
public static final Language SWEDISH
public static final Language SWAHILI
public static final Language TAMIL
public static final Language TELUGU
public static final Language THAI
public static final Language TURKISH
public static final Language UKRAINIAN
public static final Language VIETNAMESE
public static final Language CHINESE
public static final Language CHINESE_TAIWAN
public static Language[] values()
for (Language c : Language.values()) System.out.println(c);
public static Language valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static java.util.Optional<Language> of(java.util.Locale locale)
Optional
that contains the Language
for the given Locale
or an empty Optional
if there is no Language
associated with the language
obtained from the given Locale
.public java.lang.String toString()
<language code>SEPARATOR<country code>
where SEPARATOR
is a platform dependent symbol (either "_" or "-").toString
in class java.lang.Enum<Language>