public class ISOCurrency
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addBundle(java.lang.String bundleName) |
static double |
convertFromIsoMsg(java.lang.String isoamount,
java.lang.String currency)
Deprecated.
You should never use doubles
|
static java.lang.String |
convertToIsoMsg(double amount,
java.lang.String currency)
Converts an amount to an ISO Amount taking in consideration
the number of decimal digits according to currency
|
static java.lang.Object[] |
decomposeComposedCurrency(java.lang.String incurr) |
static Currency |
getCurrency(int code) |
static Currency |
getCurrency(java.lang.String code) |
static java.lang.String |
getIsoCodeFromAlphaCode(java.lang.String alphacode) |
static void |
loadPropertiesFromClasspath(java.lang.String base) |
static java.math.BigDecimal |
parseFromISO87String(java.lang.String isoamount,
java.lang.String currency) |
static java.lang.String |
toISO87String(java.math.BigDecimal amount,
java.lang.String currency) |
public static void loadPropertiesFromClasspath(java.lang.String base)
public static double convertFromIsoMsg(java.lang.String isoamount, java.lang.String currency) throws java.lang.IllegalArgumentException
isoamount
- - The ISO amount to be converted (eg. ISOField 4)currency
- - The ISO currency to be converted (eg. ISOField 49)java.lang.IllegalArgumentException
- if we fail to convert the amountpublic static java.lang.String toISO87String(java.math.BigDecimal amount, java.lang.String currency)
public static java.math.BigDecimal parseFromISO87String(java.lang.String isoamount, java.lang.String currency)
public static void addBundle(java.lang.String bundleName)
public static java.lang.String convertToIsoMsg(double amount, java.lang.String currency) throws java.lang.IllegalArgumentException
amount
- - The amount to be convertedcurrency
- - The ISO currency to be converted (eg. ISOField 49)java.lang.IllegalArgumentException
- if we fail to convert the amountpublic static java.lang.Object[] decomposeComposedCurrency(java.lang.String incurr) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static java.lang.String getIsoCodeFromAlphaCode(java.lang.String alphacode) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static Currency getCurrency(int code) throws ISOException
ISOException
public static Currency getCurrency(java.lang.String code) throws ISOException
ISOException