com.nurelm.util
Class CurrencyUtil

java.lang.Object
  extended bycom.nurelm.util.CurrencyUtil

public class CurrencyUtil
extends java.lang.Object

DOCUMENT ME!


Field Summary
static java.lang.String ERROR_INVALID_CURRENCY_CODE
          DOCUMENT ME!
static java.lang.String ERROR_INVALID_CURRENCY_NUMBER
          DOCUMENT ME!
 
Constructor Summary
CurrencyUtil()
           
 
Method Summary
static java.lang.String format(double currencyNumber, java.lang.String currencyCode)
          DOCUMENT ME!
static java.lang.String format(java.lang.String currencyNumber, java.lang.String currencyCode)
          Returns the currencyNumber in its correct currency format based on the passed-in ISO 4217 currency code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_INVALID_CURRENCY_NUMBER

public static final java.lang.String ERROR_INVALID_CURRENCY_NUMBER
DOCUMENT ME!

See Also:
Constant Field Values

ERROR_INVALID_CURRENCY_CODE

public static final java.lang.String ERROR_INVALID_CURRENCY_CODE
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

CurrencyUtil

public CurrencyUtil()
Method Detail

format

public static java.lang.String format(java.lang.String currencyNumber,
                                      java.lang.String currencyCode)
                               throws NuPlatformException
Returns the currencyNumber in its correct currency format based on the passed-in ISO 4217 currency code. For example, pass in 2 and USD, and you'll get $2.00. The proper amount of decimal numbers are added, with zeros present if needed (you'll never get just $2, you will get $2.00). The codes are from Table A.1 (E) - Currency and funds code list, found on http://www.bsi-global.com/Technical+Information/Publications/_Publications/tig90x.doc Note that the above list shows numeric codes as well as alphabetic. But the Currency class does not accept the numeric codes. This link above was referenced on the java API page for the Currency class: http://java.sun.com/j2se/1.4/docs/api/java/util/Currency.html

Parameters:
currencyNumber - DOCUMENT ME!
currencyCode - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
NuPlatformException - DOCUMENT ME!

format

public static java.lang.String format(double currencyNumber,
                                      java.lang.String currencyCode)
                               throws NuPlatformException
DOCUMENT ME!

Parameters:
currencyNumber - DOCUMENT ME!
currencyCode - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
NuPlatformException - DOCUMENT ME!