Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.context.i18n
Class SimpleLocaleContext

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

All Implemented Interfaces:
  LocaleContext

    public class SimpleLocaleContext

extends java.lang.Object
implements LocaleContext

Simple implementation of the `LocaleContext` interface, always returning a specified `Locale`.

Since:
  1.2
Author:
  Juergen Hoeller

Constructor Summary
`SimpleLocaleContext(java.util.Locale locale)` Create a new SimpleLocaleContext that exposes the specified Locale.

Method Summary
`java.util.Locale` | `getLocale()` Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleLocaleContext

    public SimpleLocaleContext(java.util.Locale locale)

  Create a new SimpleLocaleContext that exposes the specified Locale. Every `getLocale()` will return this Locale.

  Parameters:
    `locale` - the Locale to expose

Method Detail

### getLocale

    public java.util.Locale getLocale()

  Description copied from interface: `LocaleContext`
  Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.

  Specified by:
    `getLocale` in interface `LocaleContext`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD