Package com.gengoai
Enum Language
- java.lang.Object
-
- java.lang.Enum<Language>
-
- com.gengoai.Language
-
- All Implemented Interfaces:
Serializable
,Comparable<Language>
public enum Language extends Enum<Language>
Enumeration of world languages with helpful information on whether or not the language is Whitespace delimited or if language is read right to left (May not be complete).
- Author:
- David B. Bracewell
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABKHAZIAN
Abkhazian language.AFAR
Afar language.AFRIKAANS
Afrikaans language.ALBANIAN
Albanian language.AMHARIC
Amharic language.ARABIC
Arabic.ARMENIAN
Armenian language.ASSAMESE
Assamese language.AYMARA
Aymara language.AZERBAIJANI
Azerbaijani language.BASHKIR
Bashkir language.BASQUE
Basque language.BENGALI
Bengali language.BHUTANI
Bhutani language.BIHARI
Bihari language.BISLAMA
Bislama language.BRETON
Breton language.BULGARIAN
Bulgarian language.BURMESE
Burmese language.BYELORUSSIAN
Byelorussian language.CAMBODIAN
Cambodian language.CATALAN
Catalan language.CHINESE
Chinese.CORSICAN
Corsican language.CROATIAN
Croatian language.CZECH
Czech language.DANISH
Danish language.DUTCH
Dutch language.ENGLISH
English.ESPERANTO
Esperanto language.ESTONIAN
Estonian language.FAEROESE
Faeroese language.FIJI
Fiji language.FINNISH
Finnish language.FRENCH
French language.FRISIAN
Frisian language.GAELIC
Gaelic language.GALICIAN
Galician language.GEORGIAN
Georgian language.GERMAN
German language.GREEK
Greek language.GREENLANDIC
Greenlandic language.GUARANI
Guarani language.GUJARATI
Gujarati language.HAUSA
Hausa language.HEBREW
Hebrew.HINDI
Hindi language.HUNGARIAN
Hungarian language.ICELANDIC
Icelandic language.INDONESIAN
Indonesian language.INTERLINGUA
Interlingua language.INTERLINGUE
Interlingue language.INUPIAK
Inupiak language.IRISH
Irish language.ITALIAN
Italian language.JAPANESE
Japanese.JAVANESE
Javanese.KANNADA
Kannada language.KASHMIRI
Kashmiri.KAZAKH
Kazakh language.KINYARWANDA
Kinyarwanda language.KIRGHIZ
Kirghiz language.KIRUNDI
Kirundi language.KOREAN
Korean language.KURDISH
Kurdish.LAOTHIAN
Laothian language.LATIN
Latin language.LATVIAN
Latvian language.LINGALA
Lingala language.LITHUANIAN
Lithuanian language.MACEDONIAN
Macedonian language.MALAGASY
Malagasy language.MALAY
Malay.MALAYALAM
Malayalam.MALTESE
Maltese language.MAORI
Maori language.MARATHI
Marathi language.MOLDAVIAN
Moldavian language.MONGOLIAN
Mongolian language.NAURU
Nauru language.NEPALI
Nepali language.NORWEGIAN
Norwegian language.OCCITAN
Occitan language.ORIYA
Oriya language.OROMO
Oromo language.PASHTO
Pashto.PERSIAN
Persian.POLISH
Polish language.PORTUGUESE
Portuguese language.PUNJABI
Punjabi.QUECHUA
Quechua language.ROMANIAN
Romanian language.RUSSIAN
Russian language.SAMOAN
Samoan language.SANGRO
Sangro language.SANSKRIT
Sanskrit language.SERBIAN
Serbian language.SERBO_CROATIAN
Serbo croatian language.SESOTHO
Sesotho language.SETSWANA
Setswana language.SHONA
Shona language.SINDHI
Sindhi.SINGHALESE
Singhalese language.SISWATI
Siswati language.SLOVAK
Slovak language.SLOVENIAN
Slovenian language.SOMALI
Somali.SPANISH
Spanish language.SUDANESE
Sudanese language.SWAHILI
Swahili language.SWEDISH
Swedish language.TAGALOG
Tagalog language.TAJIK
Tajik language.TAMIL
Tamil language.TATAR
Tatar language.TELUGU
Telugu language.THAI
Thai language.TIBETAN
Tibetan language.TIGRINYA
Tigrinya language.TONGA
Tonga language.TSONGA
Tsonga language.TURKISH
Turkish language.TURKMEN
Turkmen.TWI
Twi language.UKRAINIAN
Ukrainian language.UNKNOWN
Unknown.URDU
Urdu.UZBEK
Uzbek language.VIETNAMESE
Vietnamese language.VOLAPUK
Volapuk language.WELSH
Welsh language.WOLOF
Wolof language.XHOSA
Xhosa language.YIDDISH
Yiddish.YORUBA
Yoruba language.ZULU
Zulu language.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
asLocale()
Gets language as aLocale
static Language
fromLocale(Locale locale)
From locale language.static Language
fromString(String code)
Parses a language code to get its corresponding LanguageIdString
getCode()
Gets language code.Collator
getCollator()
Convenience method for constructing a collator using a strength ofTERTIARY
and decomposition ofFULL_DECOMPOSITION
Collator
getCollator(int strength)
Convenience method for constructing a collator usingFULL_DECOMPOSITION
Collator
getCollator(int strength, int decomposition)
Convenience method for constructing a collator.NumberFormat
getCurrencyFormat()
Gets currency format.DateFormat
getDateFormat(int style)
Gets date format.List<Locale>
getLocales()
Gets locales.NumberFormat
getNumberFormat()
Gets number format.NumberFormat
getPercentFormat()
Gets percent format.boolean
isRightToLeft()
Is the language written right to leftString
join(CharSequence[] words)
Joins the words in the array separating them with a space if the language uses whitespaceString
join(Iterable<? extends CharSequence> words)
Joins the words in the array separating them with a space if the language uses whitespaceString
join(String[] words)
Joins the words in the array separating them with a space if the language uses whitespaceboolean
usesWhitespace()
Does the language use whitespace to separate wordsstatic Language
valueOf(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.
-
-
-
Enum Constant Detail
-
ENGLISH
public static final Language ENGLISH
English.
-
JAPANESE
public static final Language JAPANESE
Japanese.
-
CHINESE
public static final Language CHINESE
Chinese.
-
ABKHAZIAN
public static final Language ABKHAZIAN
Abkhazian language.
-
AFAR
public static final Language AFAR
Afar language.
-
AFRIKAANS
public static final Language AFRIKAANS
Afrikaans language.
-
ALBANIAN
public static final Language ALBANIAN
Albanian language.
-
AMHARIC
public static final Language AMHARIC
Amharic language.
-
ARABIC
public static final Language ARABIC
Arabic.
-
ARMENIAN
public static final Language ARMENIAN
Armenian language.
-
ASSAMESE
public static final Language ASSAMESE
Assamese language.
-
AYMARA
public static final Language AYMARA
Aymara language.
-
AZERBAIJANI
public static final Language AZERBAIJANI
Azerbaijani language.
-
BASHKIR
public static final Language BASHKIR
Bashkir language.
-
BASQUE
public static final Language BASQUE
Basque language.
-
BENGALI
public static final Language BENGALI
Bengali language.
-
BHUTANI
public static final Language BHUTANI
Bhutani language.
-
BIHARI
public static final Language BIHARI
Bihari language.
-
BISLAMA
public static final Language BISLAMA
Bislama language.
-
BRETON
public static final Language BRETON
Breton language.
-
BULGARIAN
public static final Language BULGARIAN
Bulgarian language.
-
BURMESE
public static final Language BURMESE
Burmese language.
-
BYELORUSSIAN
public static final Language BYELORUSSIAN
Byelorussian language.
-
CAMBODIAN
public static final Language CAMBODIAN
Cambodian language.
-
CATALAN
public static final Language CATALAN
Catalan language.
-
CORSICAN
public static final Language CORSICAN
Corsican language.
-
CROATIAN
public static final Language CROATIAN
Croatian language.
-
CZECH
public static final Language CZECH
Czech language.
-
DANISH
public static final Language DANISH
Danish language.
-
DUTCH
public static final Language DUTCH
Dutch language.
-
ESPERANTO
public static final Language ESPERANTO
Esperanto language.
-
ESTONIAN
public static final Language ESTONIAN
Estonian language.
-
FAEROESE
public static final Language FAEROESE
Faeroese language.
-
FIJI
public static final Language FIJI
Fiji language.
-
FINNISH
public static final Language FINNISH
Finnish language.
-
FRENCH
public static final Language FRENCH
French language.
-
FRISIAN
public static final Language FRISIAN
Frisian language.
-
GAELIC
public static final Language GAELIC
Gaelic language.
-
GALICIAN
public static final Language GALICIAN
Galician language.
-
GEORGIAN
public static final Language GEORGIAN
Georgian language.
-
GERMAN
public static final Language GERMAN
German language.
-
GREEK
public static final Language GREEK
Greek language.
-
GREENLANDIC
public static final Language GREENLANDIC
Greenlandic language.
-
GUARANI
public static final Language GUARANI
Guarani language.
-
GUJARATI
public static final Language GUJARATI
Gujarati language.
-
HAUSA
public static final Language HAUSA
Hausa language.
-
HEBREW
public static final Language HEBREW
Hebrew.
-
HINDI
public static final Language HINDI
Hindi language.
-
HUNGARIAN
public static final Language HUNGARIAN
Hungarian language.
-
ICELANDIC
public static final Language ICELANDIC
Icelandic language.
-
INDONESIAN
public static final Language INDONESIAN
Indonesian language.
-
INTERLINGUA
public static final Language INTERLINGUA
Interlingua language.
-
INTERLINGUE
public static final Language INTERLINGUE
Interlingue language.
-
INUPIAK
public static final Language INUPIAK
Inupiak language.
-
IRISH
public static final Language IRISH
Irish language.
-
ITALIAN
public static final Language ITALIAN
Italian language.
-
JAVANESE
public static final Language JAVANESE
Javanese.
-
KANNADA
public static final Language KANNADA
Kannada language.
-
KASHMIRI
public static final Language KASHMIRI
Kashmiri.
-
KAZAKH
public static final Language KAZAKH
Kazakh language.
-
KINYARWANDA
public static final Language KINYARWANDA
Kinyarwanda language.
-
KIRGHIZ
public static final Language KIRGHIZ
Kirghiz language.
-
KIRUNDI
public static final Language KIRUNDI
Kirundi language.
-
KOREAN
public static final Language KOREAN
Korean language.
-
KURDISH
public static final Language KURDISH
Kurdish.
-
LAOTHIAN
public static final Language LAOTHIAN
Laothian language.
-
LATIN
public static final Language LATIN
Latin language.
-
LATVIAN
public static final Language LATVIAN
Latvian language.
-
LINGALA
public static final Language LINGALA
Lingala language.
-
LITHUANIAN
public static final Language LITHUANIAN
Lithuanian language.
-
MACEDONIAN
public static final Language MACEDONIAN
Macedonian language.
-
MALAGASY
public static final Language MALAGASY
Malagasy language.
-
MALAY
public static final Language MALAY
Malay.
-
MALAYALAM
public static final Language MALAYALAM
Malayalam.
-
MALTESE
public static final Language MALTESE
Maltese language.
-
MAORI
public static final Language MAORI
Maori language.
-
MARATHI
public static final Language MARATHI
Marathi language.
-
MOLDAVIAN
public static final Language MOLDAVIAN
Moldavian language.
-
MONGOLIAN
public static final Language MONGOLIAN
Mongolian language.
-
NAURU
public static final Language NAURU
Nauru language.
-
NEPALI
public static final Language NEPALI
Nepali language.
-
NORWEGIAN
public static final Language NORWEGIAN
Norwegian language.
-
OCCITAN
public static final Language OCCITAN
Occitan language.
-
ORIYA
public static final Language ORIYA
Oriya language.
-
OROMO
public static final Language OROMO
Oromo language.
-
PASHTO
public static final Language PASHTO
Pashto.
-
PERSIAN
public static final Language PERSIAN
Persian.
-
POLISH
public static final Language POLISH
Polish language.
-
PORTUGUESE
public static final Language PORTUGUESE
Portuguese language.
-
PUNJABI
public static final Language PUNJABI
Punjabi.
-
QUECHUA
public static final Language QUECHUA
Quechua language.
-
ROMANIAN
public static final Language ROMANIAN
Romanian language.
-
RUSSIAN
public static final Language RUSSIAN
Russian language.
-
SAMOAN
public static final Language SAMOAN
Samoan language.
-
SANGRO
public static final Language SANGRO
Sangro language.
-
SANSKRIT
public static final Language SANSKRIT
Sanskrit language.
-
SERBIAN
public static final Language SERBIAN
Serbian language.
-
SERBO_CROATIAN
public static final Language SERBO_CROATIAN
Serbo croatian language.
-
SESOTHO
public static final Language SESOTHO
Sesotho language.
-
SETSWANA
public static final Language SETSWANA
Setswana language.
-
SHONA
public static final Language SHONA
Shona language.
-
SINDHI
public static final Language SINDHI
Sindhi.
-
SINGHALESE
public static final Language SINGHALESE
Singhalese language.
-
SISWATI
public static final Language SISWATI
Siswati language.
-
SLOVAK
public static final Language SLOVAK
Slovak language.
-
SLOVENIAN
public static final Language SLOVENIAN
Slovenian language.
-
SOMALI
public static final Language SOMALI
Somali.
-
SPANISH
public static final Language SPANISH
Spanish language.
-
SUDANESE
public static final Language SUDANESE
Sudanese language.
-
SWAHILI
public static final Language SWAHILI
Swahili language.
-
SWEDISH
public static final Language SWEDISH
Swedish language.
-
TAGALOG
public static final Language TAGALOG
Tagalog language.
-
TAJIK
public static final Language TAJIK
Tajik language.
-
TAMIL
public static final Language TAMIL
Tamil language.
-
TATAR
public static final Language TATAR
Tatar language.
-
TELUGU
public static final Language TELUGU
Telugu language.
-
THAI
public static final Language THAI
Thai language.
-
TIBETAN
public static final Language TIBETAN
Tibetan language.
-
TIGRINYA
public static final Language TIGRINYA
Tigrinya language.
-
TONGA
public static final Language TONGA
Tonga language.
-
TSONGA
public static final Language TSONGA
Tsonga language.
-
TURKISH
public static final Language TURKISH
Turkish language.
-
TURKMEN
public static final Language TURKMEN
Turkmen.
-
TWI
public static final Language TWI
Twi language.
-
UKRAINIAN
public static final Language UKRAINIAN
Ukrainian language.
-
URDU
public static final Language URDU
Urdu.
-
UZBEK
public static final Language UZBEK
Uzbek language.
-
VIETNAMESE
public static final Language VIETNAMESE
Vietnamese language.
-
VOLAPUK
public static final Language VOLAPUK
Volapuk language.
-
WELSH
public static final Language WELSH
Welsh language.
-
WOLOF
public static final Language WOLOF
Wolof language.
-
XHOSA
public static final Language XHOSA
Xhosa language.
-
YIDDISH
public static final Language YIDDISH
Yiddish.
-
YORUBA
public static final Language YORUBA
Yoruba language.
-
ZULU
public static final Language ZULU
Zulu language.
-
UNKNOWN
public static final Language UNKNOWN
Unknown.
-
-
Method Detail
-
values
public static Language[] 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 (Language c : Language.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Language 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
-
fromString
public static Language fromString(String code)
Parses a language code to get its corresponding LanguageId- Parameters:
code
- language code- Returns:
- parsed language or null
-
fromLocale
public static Language fromLocale(Locale locale)
From locale language.- Parameters:
locale
- locale- Returns:
- language language
-
getCode
public String getCode()
Gets language code.- Returns:
- ISO2 Language code
-
getCollator
public final Collator getCollator(int strength, int decomposition)
Convenience method for constructing a collator.
-
getCollator
public final Collator getCollator(int strength)
Convenience method for constructing a collator usingFULL_DECOMPOSITION
- Parameters:
strength
- strength ofCollator
- Returns:
- collator collator
-
getCollator
public final Collator getCollator()
Convenience method for constructing a collator using a strength ofTERTIARY
and decomposition ofFULL_DECOMPOSITION
- Returns:
- collator collator
-
getCurrencyFormat
public NumberFormat getCurrencyFormat()
Gets currency format.- Returns:
- currency format
-
getDateFormat
public DateFormat getDateFormat(int style)
Gets date format.- Parameters:
style
- style- Returns:
- date format
-
getLocales
public List<Locale> getLocales()
Gets locales.- Returns:
- possible locales associated with language.
-
getNumberFormat
public NumberFormat getNumberFormat()
Gets number format.- Returns:
- number format
-
getPercentFormat
public NumberFormat getPercentFormat()
Gets percent format.- Returns:
- percent format
-
isRightToLeft
public boolean isRightToLeft()
Is the language written right to left- Returns:
- True if language is written right to left
-
join
public String join(String[] words)
Joins the words in the array separating them with a space if the language uses whitespace- Parameters:
words
- the words to join- Returns:
- the joined words
-
join
public String join(CharSequence[] words)
Joins the words in the array separating them with a space if the language uses whitespace- Parameters:
words
- the words to join- Returns:
- the joined words
-
join
public String join(Iterable<? extends CharSequence> words)
Joins the words in the array separating them with a space if the language uses whitespace- Parameters:
words
- the words to join- Returns:
- the joined words
-
usesWhitespace
public boolean usesWhitespace()
Does the language use whitespace to separate words- Returns:
- True if language uses white space to separate words, false if not
-
-