Jeospace API

org.jeospace.text
Class MassUnitSymbols

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

public class MassUnitSymbols
extends java.lang.Object

Localization resource for the symbols 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 MassUnitSymbols(java.util.Locale locale)
          Construct a MassUnitSymbols object for the locale.
 
Method Summary
static MassUnitSymbols getInstance()
          Return the MassUnitSymbols object for the default locale.
static MassUnitSymbols getInstance(java.util.Locale locale)
          Return the MassUnitSymbols object for the specified locale.
 java.lang.String getSymbol(MassUnit mu)
          Return the localized symbol cooresponding to the passed MassUnit object.
 java.lang.String[] getSymbols(MassUnit[] mu)
          Return an array of localized symbols 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

MassUnitSymbols

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

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

getInstance

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

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

getSymbols

public java.lang.String[] getSymbols(MassUnit[] mu)
Return an array of localized symbols cooresponding to the passed MassUnit objects.

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

getSymbol

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

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

Jeospace API

Copyright © 2006 - jeospace.org