Package io.rincl
Interface LocaleSelectable
- All Known Subinterfaces:
ResourceI18nConcern
- All Known Implementing Classes:
AbstractResourceI18nConcern
,BaseResourceI18nConcern
,EmptyResourceI18nConcern
,LocaleSelection
public interface LocaleSelectable
Allows selection of locale for locale category.
- Author:
- Garret Wilson
-
Method Summary
Modifier and TypeMethodDescriptiongetLocale
(Locale.Category category) Retrieves the configured locale for the given category.default void
Configures the locale for all locale categories.void
setLocale
(Locale.Category category, Locale locale) Configures the locale for the given locale category.
-
Method Details
-
getLocale
Retrieves the configured locale for the given category.- Parameters:
category
- The category of locale to return.- Returns:
- The the configured locale for the given category.
- Throws:
NullPointerException
- if the given category isnull
.- See Also:
-
setLocale
Configures the locale for the given locale category. Future calls togetLocale(Locale.Category)
will return the value set here.- Parameters:
category
- The category for which the locale should be set.locale
- The new locale value.- Throws:
NullPointerException
- if the given category and/or new locale isnull
.- See Also:
-
setLocale
Configures the locale for all locale categories.This is a convenience method to set all locale categories.
- Parameters:
locale
- The new locale value.- Throws:
NullPointerException
- if the given category and/or new locale isnull
.- See Also:
-