Enum Class MongoSearchLanguage
- All Implemented Interfaces:
Serializable,Comparable<MongoSearchLanguage>,Constable
Languages supported by MongoDB.
- Author:
- Christian Bremer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDanish.German.English.Spanish.Finnish.French.Hungarian.Italian.Dutch.Norwegian.If you specify a language value ofnone, then the text search uses simple tokenization with no list of stop words and no stemming.Portuguese.Romanian.Russian.Swedish.Turkish. -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoSearchLanguagefromLocale(Locale locale, MongoSearchLanguage fallback) From locale.static MongoSearchLanguageFrom language tag (two-letter code).static MongoSearchLanguagefromValue(String text, MongoSearchLanguage fallback) From language tag (two-letter code).toLocale()To locale.toString()static MongoSearchLanguageReturns the enum constant of this class with the specified name.static MongoSearchLanguage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
If you specify a language value ofnone, then the text search uses simple tokenization with no list of stop words and no stemming. -
DA
Danish. -
DE
German. -
EN
English. -
ES
Spanish. -
FI
Finnish. -
FR
French. -
HU
Hungarian. -
IT
Italian. -
NL
Dutch. -
NO
Norwegian. -
PT
Portuguese. -
RO
Romanian. -
RU
Russian. -
SV
Swedish. -
TR
Turkish.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<MongoSearchLanguage>
-
toLocale
To locale.- Returns:
- the locale
-
fromValue
From language tag (two-letter code).- Parameters:
text- the language tag (two-letter code)- Returns:
- the mongo search language
-
fromValue
From language tag (two-letter code).- Parameters:
text- the language tag (two-letter code)fallback- the fallback language- Returns:
- the mongo search language
-
fromLocale
From locale.- Parameters:
locale- the localefallback- the fallback language- Returns:
- the mongo search language
-