类 SimpleLocaleContext

java.lang.Object
cn.taketoday.core.i18n.SimpleLocaleContext
所有已实现的接口:
LocaleContext
直接已知子类:
SimpleTimeZoneAwareLocaleContext

public class SimpleLocaleContext extends Object implements LocaleContext
Simple implementation of the LocaleContext interface, always returning a specified Locale.
从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • SimpleLocaleContext

      public SimpleLocaleContext(@Nullable Locale locale)
      Create a new SimpleLocaleContext that exposes the specified Locale. Every getLocale() call will return this Locale.
      参数:
      locale - the Locale to expose, or null for no specific one
  • 方法详细资料

    • getLocale

      @Nullable public Locale getLocale()
      从接口复制的说明: LocaleContext
      Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.
      指定者:
      getLocale 在接口中 LocaleContext
      返回:
      the current Locale, or null if no specific Locale associated
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object