public class DefaultLocaleProvider extends Object implements LocaleProvider
LocaleProvider
Constructor and Description |
---|
DefaultLocaleProvider() |
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale()
Gets the provided locale.
|
boolean |
isValidLocale(Locale locale)
Validates if provided
Locale is value |
boolean |
isValidLocaleString(String localeStr)
Validates if provided string is a valid
Locale |
public Locale getLocale()
LocaleProvider
getLocale
in interface LocaleProvider
public boolean isValidLocaleString(String localeStr)
LocaleProvider
Locale
isValidLocaleString
in interface LocaleProvider
localeStr
- a String representing locale, e.g. en_ENpublic boolean isValidLocale(Locale locale)
LocaleProvider
Locale
is valueisValidLocale
in interface LocaleProvider
locale
- instance of Locale
to validateCopyright © 2000–2020 Apache Software Foundation. All rights reserved.