Jeospace API

org.jeospace.text
Class MassUnitNames

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

public class MassUnitNames
extends java.lang.Object

Localization resource for the names of units of mass.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Field Summary
protected static java.util.HashMap cache
          Cache of resource bundles
 
Constructor Summary
protected MassUnitNames(java.util.Locale locale)
          Construct a MassUnitNames object for the locale.
 
Method Summary
static MassUnitNames getInstance()
          Return the MassUnitNames object for the default locale.
static MassUnitNames getInstance(java.util.Locale locale)
          Return the MassUnitNames object for the specified locale.
 java.lang.String getName(MassUnit mu)
          Return the localized name cooresponding to the passed MassUnit object.
 java.lang.String[] getNames(MassUnit[] mu)
          Return an array of localized names cooresponding to the passed MassUnit objects.
 
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

MassUnitNames

protected MassUnitNames(java.util.Locale locale)
Construct a MassUnitNames 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 MassUnitNames getInstance()
Return the MassUnitNames object for the default locale.

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

getInstance

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

Parameters:
locale - the desired locale.
Returns:
the MassUnitNames 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(MassUnit[] mu)
Return an array of localized names cooresponding to the passed MassUnit objects.

Parameters:
mu - an array of MassUnit onjects.
Returns:
the String[] of the localized length unit names cooresponding to the MassUnit object parameters.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for a MassUnit.

getName

public java.lang.String getName(MassUnit mu)
Return the localized name cooresponding to the passed MassUnit object.

Parameters:
mu - the MassUnit onjects.
Returns:
the String of the localized length unit name cooresponding to the MassUnit object parameter.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for the MassUnit.

Jeospace API

Copyright © 2006 - jeospace.org