public class SimpleTimeZoneAwareLocaleContext extends SimpleLocaleContext implements TimeZoneAwareLocaleContext
TimeZoneAwareLocaleContext interface,
always returning a specified Locale and TimeZone.
Note: Prefer the use of SimpleLocaleContext when only setting
a Locale but no TimeZone.
LocaleContextHolder.setLocaleContext(org.springframework.context.i18n.LocaleContext),
LocaleContextHolder.getTimeZone()| Constructor and Description |
|---|
SimpleTimeZoneAwareLocaleContext(java.util.Locale locale,
java.util.TimeZone timeZone)
Create a new SimpleTimeZoneAwareLocaleContext that exposes the specified
Locale and TimeZone.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.TimeZone |
getTimeZone()
Return the current TimeZone, which can be fixed or determined dynamically,
depending on the implementation strategy.
|
java.lang.String |
toString() |
getLocaleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocalepublic SimpleTimeZoneAwareLocaleContext(java.util.Locale locale,
java.util.TimeZone timeZone)
SimpleLocaleContext.getLocale() call will return the given
Locale, and every getTimeZone() call will return the given TimeZone.locale - the Locale to exposetimeZone - the TimeZone to exposepublic java.util.TimeZone getTimeZone()
TimeZoneAwareLocaleContextgetTimeZone in interface TimeZoneAwareLocaleContextnull if no specific TimeZone associatedpublic java.lang.String toString()
toString in class SimpleLocaleContext