Jeospace API

org.jeospace.text
Class WorldNames

java.lang.Object
  extended byorg.jeospace.text.WorldNames

public class WorldNames
extends java.lang.Object

Localization resource for the names of worlds in the Solar System.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton
See Also:
Locale

Field Summary
protected static java.util.HashMap cache
          Cache of resource bundles
 
Constructor Summary
protected WorldNames(java.util.Locale locale)
          Construct a WorldNames object for the locale.
 
Method Summary
static WorldNames getInstance()
          Return the WorldNames object for the default locale.
static WorldNames getInstance(java.util.Locale locale)
          Return the WorldNames object for the specified locale.
 java.lang.String getName(java.lang.String name)
          Return the localized world name cooresponding to the passed string.
 java.lang.String[] getNames(java.lang.String[] name)
          Return an array of localized world names cooresponding to the passed array of strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected static final java.util.HashMap cache
Cache of resource bundles

Constructor Detail

WorldNames

protected WorldNames(java.util.Locale locale)
Construct a WorldNames object for the locale.

Throws:
MissingResourceException - - if the resources for the specified locale cannot be found or cannot be loaded.
Method Detail

getInstance

public static WorldNames getInstance()
Return the WorldNames object for the default locale.

Returns:
the WorldNames object for the default locale.
Throws:
MissingResourceException - - if the resources for the specified locale cannot be found or cannot be loaded.

getInstance

public static WorldNames getInstance(java.util.Locale locale)
Return the WorldNames object for the specified locale.

Parameters:
locale - the desired locale.
Returns:
the WorldNames object for the cooresponding locale.
Throws:
MissingResourceException - - if the resources for the specified locale cannot be found or cannot be loaded.

getNames

public java.lang.String[] getNames(java.lang.String[] name)
Return an array of localized world names cooresponding to the passed array of strings.

Parameters:
name - an array of world name strings.
Returns:
the String[] of the localized world names cooresponding to the argument parameters.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for an argument.

getName

public java.lang.String getName(java.lang.String name)
Return the localized world name cooresponding to the passed string.

Parameters:
name - the world name.
Returns:
the localized world name cooresponding to the argument parameter.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for the argument.

Jeospace API

Copyright © 2006 - jeospace.org