Jeospace API

org.jeospace.text
Class LengthUnitSymbols

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

public class LengthUnitSymbols
extends java.lang.Object

Localization resource for the symbols of length units.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Field Summary
protected static java.util.HashMap cache
           
 
Constructor Summary
protected LengthUnitSymbols(java.util.Locale locale)
          Construct a LengthUnitSymbols object for the locale.
 
Method Summary
static LengthUnitSymbols getInstance()
          Return the LengthUnitSymbols object for the default locale.
static LengthUnitSymbols getInstance(java.util.Locale locale)
          Return the LengthUnitSymbols object for the specified locale.
 java.lang.String getSymbol(LengthUnit lu)
          Return the localized symbol cooresponding to the passed LengthUnit object.
 java.lang.String[] getSymbols(LengthUnit[] lu)
          Return an array of localized symbols cooresponding to the passed LengthUnit 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
Constructor Detail

LengthUnitSymbols

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

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

getInstance

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

Parameters:
locale - the desired locale.
Returns:
the LengthUnitSymbols 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(LengthUnit[] lu)
Return an array of localized symbols cooresponding to the passed LengthUnit objects.

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

getSymbol

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

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

Jeospace API

Copyright © 2006 - jeospace.org