org.springframework.context.i18n

## 类 SimpleTimeZoneAwareLocaleContext

- java.lang.Object
- - org.springframework.context.i18n.SimpleLocaleContext
  - - org.springframework.context.i18n.SimpleTimeZoneAwareLocaleContext

- 所有已实现的接口:
    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.

  从以下版本开始:
    4.0
  作者:
    Juergen Hoeller, Nicholas Williams
  另请参阅:
    `LocaleContextHolder.setLocaleContext(org.springframework.context.i18n.LocaleContext)`, `LocaleContextHolder.getTimeZone()`

- - ### 构造器概要

    构造器
    构造器和说明
    `SimpleTimeZoneAwareLocaleContext(Locale locale, TimeZone timeZone)` Create a new SimpleTimeZoneAwareLocaleContext that exposes the specified Locale and TimeZone.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `TimeZone` | `getTimeZone()` Return the current TimeZone, which can be fixed or determined dynamically, depending on the implementation strategy.
    `String` | `toString()`

    - ### 从类继承的方法 org.springframework.context.i18n.SimpleLocaleContext

      `getLocale`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### 从接口继承的方法 org.springframework.context.i18n.LocaleContext

      `getLocale`

- - ### 构造器详细资料

    - #### 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.
      参数:
        `locale` - the Locale to expose
        `timeZone` - the TimeZone to expose

  - ### 方法详细资料

    - #### getTimeZone

          @Nullable
          public TimeZone getTimeZone()

      从接口复制的说明: `TimeZoneAwareLocaleContext`
      Return the current TimeZone, which can be fixed or determined dynamically, depending on the implementation strategy.
      指定者:
        `getTimeZone` 在接口中 `TimeZoneAwareLocaleContext`
      返回:
        the current TimeZone, or `null` if no specific TimeZone associated

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `SimpleLocaleContext`