T
- The context object which will be used to resolve the localepublic abstract class AbstractLocaleResolver<T> extends Object implements LocaleResolver<T>
LocaleResolver
and handles default locale resolution.Modifier and Type | Field and Description |
---|---|
protected Locale |
defaultLocale |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractLocaleResolver(Locale defaultLocale) |
Modifier and Type | Method and Description |
---|---|
Locale |
resolveOrDefault(T request)
Resolves the local or returns the default locale.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolve
protected final Locale defaultLocale
public AbstractLocaleResolver(Locale defaultLocale)
defaultLocale
- The locale to use if one cannot be found.@NonNull public Locale resolveOrDefault(@NonNull T request)
LocaleResolver
resolveOrDefault
in interface LocaleResolver<T>
request
- The context