public final class UtilsCountryLanguage
extends java.lang.Object
Class that provides methods to get or check the country codes and language codes supported by this java version.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ES_COUNTRY_CODE
Constant attribute that represents the region code 'ES' for 'Spain'.
|
static java.lang.String |
ES_COUNTRY_NAME
Constant attribute that represents the region name 'Spain' for the code 'ES'.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkCountryCode(java.lang.String countryCode)
Checks if the input parameter is a string taht represents a country code specified in ISO 3166.
|
static boolean |
checkLanguageCode(java.lang.String languageCode)
Checks if the input parameter is a string that represents a language code specified in ISO 639 (not stable standard).
|
static java.util.Set<java.lang.String> |
getCountryCodes()
Gets a set with all the country codes (ISO 3166) and 'EU'.
|
static java.lang.String |
getFirstLocaleCountryNameOfCountryCode(java.lang.String countryCode)
Gets the first finded country/region name assigne to the locale associated to the input
country code (ISO 3166).
|
static java.util.Locale |
getFirstLocaleOfCountryCode(java.lang.String countryCode)
Gets the first finded locale associated to the input country code (ISO 3166).
|
static java.util.Set<java.lang.String> |
getLanguageCodes()
Gets a set with all the language codes (ISO 639).
|
public static final java.lang.String ES_COUNTRY_CODE
public static final java.lang.String ES_COUNTRY_NAME
public static boolean checkCountryCode(java.lang.String countryCode)
countryCode - String with the country code to analyze.true if the input parameter represents a country code in ISO 3166. Otherwise false.public static java.util.Set<java.lang.String> getCountryCodes()
public static boolean checkLanguageCode(java.lang.String languageCode)
languageCode - String with the language code to analyze.true if the input parameter represents a language code in ISO 639 (not stable standard).
Otherwise false.public static java.util.Set<java.lang.String> getLanguageCodes()
public static java.util.Locale getFirstLocaleOfCountryCode(java.lang.String countryCode)
countryCode - Country Code (ISO 3166) from which search the locale.null.public static java.lang.String getFirstLocaleCountryNameOfCountryCode(java.lang.String countryCode)
countryCode - Country Code (ISO 3166) from which search the locale.null.