Jeospace API

org.jeospace.text
Class MultPrefixes

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

public class MultPrefixes
extends java.lang.Object

Localization resource accessor for the prefixes of Mults.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Field Summary
protected static java.util.HashMap cache
           
protected  java.util.ResourceBundle resources
           
 
Constructor Summary
protected MultPrefixes(java.util.Locale locale)
          Construct a MultPrefixes object for the locale.
 
Method Summary
static MultPrefixes getInstance()
          Return the MultPrefixes object for the default locale.
static MultPrefixes getInstance(java.util.Locale locale)
          Return the MultPrefixes object for the specified locale.
 java.lang.String getPrefix(Mult mult)
          Return the localized prefix cooresponding to the passed Mult object.
 java.lang.String[] getPrefixes(Mult[] mult)
          Return an array of localized prefixes cooresponding to the passed Mult 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

resources

protected java.util.ResourceBundle resources
Constructor Detail

MultPrefixes

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

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

getInstance

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

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

getPrefixes

public java.lang.String[] getPrefixes(Mult[] mult)
Return an array of localized prefixes cooresponding to the passed Mult objects.

Parameters:
mult - an array of Mult objects.
Returns:
the String[] of the localized multiplier names cooresponding to the Mult object parameters.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for a Mult.

getPrefix

public java.lang.String getPrefix(Mult mult)
Return the localized prefix cooresponding to the passed Mult object.

Parameters:
mult - the Mult object.
Returns:
the String of the localized multiplier name cooresponding to the Mult object parameter.
Throws:
java.util.MissingResourceException - - if the resources for the specified locale do not contain a localized name for the Mult.

Jeospace API

Copyright © 2006 - jeospace.org