openfuture.util.misc
Class SessionLocales

java.lang.Object
  |
  +--openfuture.util.misc.SessionLocales
All Implemented Interfaces:
java.io.Serializable

public class SessionLocales
extends java.lang.Object
implements java.io.Serializable

SessionLocales.java Created: Tue Jan 09 08:14:36 2001

Version:
$Revision: 1.4 $
Author:
Wolfgang Reissenberger
See Also:
Serialized Form

Constructor Summary
SessionLocales(java.lang.String names)
          Creates a new SessionLocales instance.
 
Method Summary
 void addLocale(java.util.Locale l)
          Adds a new Locale to the current list.
static java.util.Locale createLocale(java.lang.String name)
          Creates a new Locale from the given ISO locale name (de_DE, etc.).
 java.util.LinkedList getCodes()
          Get the value of codes.
 java.util.LinkedList getDisplayNames()
          Get the value of displayNames.
 java.util.LinkedList getLocales()
          Get the value of locales.
 java.util.Locale selectClosest(java.util.Locale root)
          Select the locale from the session locales that is the closest one to the given locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionLocales

public SessionLocales(java.lang.String names)
Creates a new SessionLocales instance.
Parameters:
names - a String value
Method Detail

createLocale

public static java.util.Locale createLocale(java.lang.String name)
Creates a new Locale from the given ISO locale name (de_DE, etc.).
Parameters:
name - a String value
Returns:
a Locale value

selectClosest

public java.util.Locale selectClosest(java.util.Locale root)
Select the locale from the session locales that is the closest one to the given locale. If no good match is found, the default locale is returned.
Parameters:
root - the given locale
Returns:
the locale that matches best from the session locales

getCodes

public java.util.LinkedList getCodes()
Get the value of codes.
Returns:
value of codes.

getDisplayNames

public java.util.LinkedList getDisplayNames()
Get the value of displayNames.
Returns:
value of displayNames.

getLocales

public java.util.LinkedList getLocales()
Get the value of locales.
Returns:
value of locales.

addLocale

public void addLocale(java.util.Locale l)
Adds a new Locale to the current list.
Parameters:
l - a Locale value


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.