Class LocaleUtils
java.lang.Object
net.sourceforge.jnlp.util.LocaleUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LocaleReturns aLocalefrom a locale string.static booleanlocaleMatches(Locale[] availableLocales, Locale locale) (package private) static booleanlocalMatches(Locale requested, LocaleUtils.Match matchLevel, Locale... available) Returns whether a locale is matched by one of more other locales.
-
Constructor Details
-
LocaleUtils
public LocaleUtils()
-
-
Method Details
-
getLocale
Returns aLocalefrom a locale string. Each locale is specified by a language identifier, possibly country identifier, and possibly a variant. The syntax is as follows:locale ::= language [ "_" country [ "_" variant ] ]
- Parameters:
localeString- the locale string- Returns:
- locale of document
- Throws:
ParseException
-
localeMatches
-
localMatches
Returns whether a locale is matched by one of more other locales. Only the non-empty language, country, and variant codes are compared; for example, a requested locale of Locale("","","") would always return true.- Parameters:
requested- the requested localematchLevel- the depth with which to match locales.available- the available locales- Returns:
trueifrequestedmatches any ofavailable, or ifavailableis empty ornull.- See Also:
-