Class Currency
java.lang.Object
org.jpos.iso.Currency
- All Implemented Interfaces:
Serializable
ISO Currency Conversion package
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatAmountForISOMsg(double amount) Formats an amount for inclusion in an ISO message (zero-padded, 12 digits).Returns the ISO alpha currency code.intReturns the number of decimal places for this currency.intReturns the ISO numeric currency code.doubleparseAmountFromISOMsg(String isoamount) Parses an ISO amount string into a double by applying the currency's decimal shift.toString()
-
Constructor Details
-
Currency
-
-
Method Details
-
getDecimals
Returns the number of decimal places for this currency.- Returns:
- decimal count
-
getIsoCode
-
getAlphaCode
-
formatAmountForISOMsg
Formats an amount for inclusion in an ISO message (zero-padded, 12 digits).- Parameters:
amount- the amount to format- Returns:
- 12-character zero-padded string
-
parseAmountFromISOMsg
Parses an ISO amount string into a double by applying the currency's decimal shift.- Parameters:
isoamount- the ISO-formatted amount string (no decimal point)- Returns:
- the decimal amount value
-
toString
-