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 Details

    • SimpleTimeZoneAwareLocaleContext

      public SimpleTimeZoneAwareLocaleContext(@Nullable Locale locale, @Nullable TimeZone timeZone)
      Create a new SimpleTimeZoneAwareLocaleContext that exposes the specified Locale and TimeZone. Every SimpleLocaleContext.getLocale() call will return the given Locale, and every getTimeZone() call will return the given TimeZone.
      Parameters:
      locale - the Locale to expose
      timeZone - the TimeZone to expose
  • Method Details