Package com.iizix.selector
Class LanguageMatch
- java.lang.Object
- com.iizix.selector.LanguageMatch
public class LanguageMatch extends java.lang.Object
Language match class.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.String>
countryNames
Read-only map with upper case valid country codes 2 letters, mapped to country name.
Constructor Summary
Constructors Constructor Description LanguageMatch()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
exists(java.lang.String match)
Checks if the match string exists.static java.lang.String
getDescription(java.lang.String match)
Gets the language description for a string.static java.util.Map<java.lang.String,java.lang.String>
getMap()
Gets the map of languages that can match with this class.static java.util.Map<java.lang.String,java.lang.String>
getMapLowerCase()
Gets the map of languages with the Language Codes in its proper character case.static java.util.Map<java.lang.String,java.lang.String>
getSimpleMap()
Gets the map of simple languages with the Language Codes in its proper character case.static java.util.Map<java.lang.String,java.lang.String>
getSimpleMapLowerCase()
Gets the map of simple languages with the Language Codes in LOWER CASE.static boolean
match(EnvProps envProps, java.lang.String match)
Matches a language.
Method Detail
match
public static boolean match(EnvProps envProps, java.lang.String match)
Matches a language.- Parameters:
envProps
- The Client environment properties.match
- The match string.- Returns:
- true for match, false otherwise.
exists
public static boolean exists(java.lang.String match)
Checks if the match string exists.- Parameters:
match
- The match string is case insensitive.- Returns:
- true if it exists, false otherwise.
getDescription
public static java.lang.String getDescription(java.lang.String match)
Gets the language description for a string. This method is typically used in the Designer.- Parameters:
match
- The match string is case insensitive.- Returns:
- The description of the language matching, null for none.
getMap
public static java.util.Map<java.lang.String,java.lang.String> getMap()
Gets the map of languages that can match with this class.- Returns:
- An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using CASE SENSITIVE Language Codes. Use the method
getMapLowerCase()
to get the language codes in lower case.
getMapLowerCase
public static java.util.Map<java.lang.String,java.lang.String> getMapLowerCase()
Gets the map of languages with the Language Codes in its proper character case.- Returns:
- An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using LOWER CASE Language Codes. Use the method
getMap()
to get the map using real case of the language codes.
getSimpleMap
public static java.util.Map<java.lang.String,java.lang.String> getSimpleMap()
Gets the map of simple languages with the Language Codes in its proper character case.- Returns:
- An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using CASE SENSITIVE Language Codes. Use the method
getSimpleMapLowerCase()
to get the language codes in lower case.
getSimpleMapLowerCase
public static java.util.Map<java.lang.String,java.lang.String> getSimpleMapLowerCase()
Gets the map of simple languages with the Language Codes in LOWER CASE.- Returns:
- An unmodifiable map with the string match IN LOWER CASE as keys and descriptions as values, sorted by keys. Please note that the map is using LOWER CASE Language Codes. Use the method
getSimpleMap()
to get the map using real case of the language codes.