Oracle

com.compoze.util
Class LocaleUtility

java.lang.Object
  extended by com.compoze.util.LocaleUtility

public class LocaleUtility
extends java.lang.Object

LocaleUtility helps enumerate and search the available locales.


Constructor Summary
LocaleUtility()
           
 
Method Summary
static java.lang.String[] getAvailableLocaleNames()
          Gets the display names of the available locales.
static java.lang.String[] getAvailableLocaleNames(java.util.Locale locale)
          Gets the display names of the available locales.
static java.util.Locale getByDisplayName(java.lang.String sDisplayName)
          Get a locale by its display name.
static java.util.Locale getByDisplayName(java.lang.String sDisplayName, java.util.Locale locale)
          Get a locale by its display name.
static void main(java.lang.String[] args)
          Exerciser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleUtility

public LocaleUtility()
Method Detail

getAvailableLocaleNames

public static java.lang.String[] getAvailableLocaleNames()
Gets the display names of the available locales.

Returns:
the display names of the available locales

getAvailableLocaleNames

public static java.lang.String[] getAvailableLocaleNames(java.util.Locale locale)
Gets the display names of the available locales.

Parameters:
locale - the locale to get the display names in
Returns:
the display names of the available locales

getByDisplayName

public static java.util.Locale getByDisplayName(java.lang.String sDisplayName)
Get a locale by its display name.

Parameters:
sDisplayName - the display name of the locale to search for
Returns:
the locale, or null if it is not found

getByDisplayName

public static java.util.Locale getByDisplayName(java.lang.String sDisplayName,
                                                java.util.Locale locale)
Get a locale by its display name.

Parameters:
sDisplayName - the display name of the locale to search for
locale - the locale of the display name
Returns:
the locale, or null if it is not found

main

public static void main(java.lang.String[] args)
Exerciser.

Parameters:
args - arguments

Oracle

Copyright ©1999-2008 Oracle All rights reserved.