Package org.springframework.context.i18n
Class SimpleTimeZoneAwareLocaleContext
java.lang.Object
org.springframework.context.i18n.SimpleLocaleContext
org.springframework.context.i18n.SimpleTimeZoneAwareLocaleContext
- All Implemented Interfaces:
- LocaleContext,- TimeZoneAwareLocaleContext
public class SimpleTimeZoneAwareLocaleContext
extends SimpleLocaleContext
implements TimeZoneAwareLocaleContext
Simple implementation of the 
TimeZoneAwareLocaleContext interface,
 always returning a specified Locale and TimeZone.
 Note: Prefer the use of SimpleLocaleContext when only setting
 a Locale but no TimeZone.
- Since:
- 4.0
- Author:
- Juergen Hoeller, Nicholas Williams
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleTimeZoneAwareLocaleContext(Locale locale, TimeZone timeZone) Create a new SimpleTimeZoneAwareLocaleContext that exposes the specified Locale and TimeZone.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the current TimeZone, which can be fixed or determined dynamically, depending on the implementation strategy.toString()Methods inherited from class org.springframework.context.i18n.SimpleLocaleContextgetLocaleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.i18n.LocaleContextgetLocale
- 
Constructor Details- 
SimpleTimeZoneAwareLocaleContextCreate a new SimpleTimeZoneAwareLocaleContext that exposes the specified Locale and TimeZone. EverySimpleLocaleContext.getLocale()call will return the given Locale, and everygetTimeZone()call will return the given TimeZone.- Parameters:
- locale- the Locale to expose
- timeZone- the TimeZone to expose
 
 
- 
- 
Method Details- 
getTimeZoneDescription copied from interface:TimeZoneAwareLocaleContextReturn the current TimeZone, which can be fixed or determined dynamically, depending on the implementation strategy.- Specified by:
- getTimeZonein interface- TimeZoneAwareLocaleContext
- Returns:
- the current TimeZone, or nullif no specific TimeZone associated
 
- 
toString- Overrides:
- toStringin class- SimpleLocaleContext
 
 
-