public class SimpleLocaleContext extends java.lang.Object implements LocaleContext
LocaleContext
interface,
always returning a specified Locale
.Modifier and Type | Field and Description |
---|---|
private java.util.Locale |
locale |
Constructor and Description |
---|
SimpleLocaleContext(java.util.Locale locale)
Create a new SimpleLocaleContext that exposes the specified Locale.
|
public SimpleLocaleContext(java.util.Locale locale)
getLocale()
will return this Locale.locale
- the Locale to exposepublic java.util.Locale getLocale()
LocaleContext
getLocale
in interface LocaleContext
public java.lang.String toString()
toString
in class java.lang.Object