|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.payapi.Amount
Amount objects contain the attributes associated with a specific currency amount value. Three attributes are associated with an amount instance:
amount
, which contains the number of currency units
amountExp10
, which is the amount's base10 exponent value. This
attribute indicates the correct positioning of the decimal point in the
amount
.
currency
, which is the ISO 4217 currency code associated with
this amount instance.
Amount objects are used throughout the Framework to represent amount values associated with various payment transactions.
Constructor Summary | |
---|---|
Amount(short icurrency,
int iamount,
int iamountExp10)
Constructs an Amount object with the specified currency code, amount and amount exponent values. |
|
Amount(String icurrency,
String iamount,
String iamountExp10)
Constructs an Amount object with the specified currency code, amount and amount exponent String representations. |
Method Summary | |
---|---|
static String |
currencyAsString(short currency)
Converts the input currency code to a 3-digit string. |
boolean |
currencyMatch(Amount arg)
Returns true if currency and amountExp10 of the argument match. |
int |
getamount()
Deprecated. Use getAmount() |
int |
getAmount()
Returns the amount value from this Amount object. |
int |
getamountExp10()
Deprecated. Use getAmountExp10() |
int |
getAmountExp10()
Returns the base10 exponent value from this Amount object. |
short |
getcurrency()
Deprecated. Use getCurrency() |
short |
getCurrency()
Returns the currency value from this Amount object. |
String |
getcurrencyAsString()
Deprecated. Use getCurrencyAsString() |
String |
getCurrencyAsString()
Returns this object's currency code as a 3-digit string. |
String |
toString()
Returns a string representation of this Amount object for tracing purposes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Amount(short icurrency, int iamount, int iamountExp10)
icurrency
- a short containing the ISO 4217 currency codeiamount
- an int containing the amount value without a decimal pointiamtExp10
- an int containing the base10 exponent to indicate
the correct placement of the decimal pointpublic Amount(String icurrency, String iamount, String iamountExp10)
icurrency
- a String containing the ISO 4217 currency code.
This value will be converted into a short before being stored.iamount
- a String containing the amount value without a decimal point.
This value will be converted into an int before being stored.iamtExp10
- a String containing the base10 exponent to indicate
the correct placement of the decimal point.
This value will be converted into an int before being stored.NumberFormatException
- thrown if any of the numeric conversions failMethod Detail |
public short getCurrency()
public short getcurrency()
public int getAmount()
public int getamount()
public int getAmountExp10()
public int getamountExp10()
public String getCurrencyAsString()
Code String 840 "840" 27 "027" 5 "005"
public String getcurrencyAsString()
public static String currencyAsString(short currency)
Code String 840 "840" 27 "027" 5 "005"
public boolean currencyMatch(Amount arg)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |