@NotThreadSafe public class LocaleManager extends Object implements ILocaleManager
| Constructor and Description |
|---|
LocaleManager() |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.collection.ext.ICommonsList<Locale> |
getAllAvailableLocales() |
Locale |
getDefaultLocale() |
boolean |
hasLocales() |
boolean |
isSupportedLocale(Locale aLocale)
Check if the passed locale is a supported locale.
|
com.helger.commons.state.EChange |
registerLocale(Locale aLocale)
Register a new locale
|
com.helger.commons.state.EChange |
setDefaultLocale(Locale aDefaultLocale)
Set the default locale.
|
String |
toString() |
@Nonnull public com.helger.commons.state.EChange registerLocale(@Nonnull Locale aLocale)
ILocaleManagerregisterLocale in interface ILocaleManageraLocale - The locale to be added. May not be null.EChange.@Nonnull public com.helger.commons.state.EChange setDefaultLocale(@Nonnull Locale aDefaultLocale)
ILocaleManagersetDefaultLocale in interface ILocaleManageraDefaultLocale - The locale to be used as the default. May not be null.EChange@Nullable public Locale getDefaultLocale()
getDefaultLocale in interface ILocaleManagernull if non is
defined@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<Locale> getAllAvailableLocales()
getAllAvailableLocales in interface ILocaleManagerpublic boolean hasLocales()
hasLocales in interface ILocaleManagertrue if at least one locale is present,
false otherwisepublic boolean isSupportedLocale(@Nullable Locale aLocale)
ILocaleManagerisSupportedLocale in interface ILocaleManageraLocale - The locale to checktrue if the passed locale is supported,
false otherwise.Copyright © 2014–2017 Philip Helger. All rights reserved.