org.apache.jetspeed.i18n
Class CurrentLocale

java.lang.Object
  extended byorg.apache.jetspeed.i18n.CurrentLocale

public final class CurrentLocale
extends Object

Maintains a Locale for the current Thread

Version:
$Id: CurrentLocale.java 188374 2005-03-07 13:57:43Z 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-2005 Apache Software Foundation. All Rights Reserved.