org.apache.jetspeed.i18n
Class CurrentLocale

java.lang.Object
  extended by org.apache.jetspeed.i18n.CurrentLocale

public final class CurrentLocale
extends Object

Maintains a Locale for the current Thread

Version:
$Id: CurrentLocale.java 516448 2007-03-09 16:25:47Z ate $
Author:
Ate Douma

Field Summary
private static ThreadLocal currentLocale
           
 
Constructor Summary
private CurrentLocale()
           
 
Method Summary
static Locale get()
           
static void set(Locale locale)
          Sets a Locale for this Thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentLocale

private static ThreadLocal currentLocale
Constructor Detail

CurrentLocale

private CurrentLocale()
Method Detail

get

public static Locale get()
Returns:
the currently set Locale in this Thread or Locale.getDefault() otherwise

set

public static void set(Locale locale)
Sets a Locale for this Thread.
Use a null parameter to revert back to Locale.getDefault()

Parameters:
locale - Locale for this Thread


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.