org.crosswire.jsword.internationalisation
Class LocaleProviderManager

java.lang.Object
  extended by org.crosswire.jsword.internationalisation.LocaleProviderManager

public final class LocaleProviderManager
extends Object

A factory for creating LocaleProvider objects, to support all the static instances of where JSword needs access to the the Locale.

It is expected that the LocaleProvider will only be set once, as a result, no effort is made to make this thread-safe as this should happen on start up of the application. A default locale provider is given which simply returns the default locale. See DefaultLocaleProvider for more details.

Author:
Chris Burrell
See Also:
The GNU Lesser General Public License for details.

Field Summary
private static LocaleProvider localeProvider
           
 
Constructor Summary
private LocaleProviderManager()
          Prevent public access.
 
Method Summary
static Locale getLocale()
          Gets the locale to be used by the JSword library
static LocaleProvider getLocaleProvider()
          Gets the locale provider.
static void setLocaleProvider(LocaleProvider provider)
          Allow third-party applications to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localeProvider

private static LocaleProvider localeProvider
Constructor Detail

LocaleProviderManager

private LocaleProviderManager()
Prevent public access. Instantiates a new locale provider factory.

Method Detail

getLocaleProvider

public static LocaleProvider getLocaleProvider()
Gets the locale provider.

Returns:
the locale provider

getLocale

public static Locale getLocale()
Gets the locale to be used by the JSword library

Returns:
the locale

setLocaleProvider

public static void setLocaleProvider(LocaleProvider provider)
Allow third-party applications to.

Parameters:
provider - the new locale provider

Copyright ยจ 2003-2015