java.lang.Objectcom.ibm.commerce.price.utils.UnitAmount
com.ibm.commerce.price.utils.MonetaryAmount
A monetary amount.
Constructor Summary | |
MonetaryAmount(java.math.BigDecimal aValue, java.lang.String aCurrency) MonetaryAmount constructor. |
Method Summary | |
MonetaryAmount | add(MonetaryAmount aMonetaryAmount) Add 2 monetary amounts. |
protected UnitAmount | createNewUnitAmount(java.lang.Object aValue, java.lang.String aUnit) Create a new monetary amount from the parameters. |
MonetaryAmount | divide(java.math.BigDecimal aBigDecimal) Divide a monetary amount by a big decimal. |
java.lang.String | getCurrency() Get the currency of the monetary amount. |
java.math.BigDecimal | getValue() Get the value of the monetary amount. |
MonetaryAmount | multiply(java.math.BigDecimal aBigDecimal) Multiply a monetary amount by a big decimal value. |
void | setValue(java.math.BigDecimal aValue) Set the value of the monetary amount. |
MonetaryAmount | subtract(MonetaryAmount aMonetaryAmount) Subtract 2 monetary amounts. |
Methods inherited from class com.ibm.commerce.price.utils.UnitAmount |
getUnit, getValueI, setUnit, setValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MonetaryAmount(java.math.BigDecimal aValue, java.lang.String aCurrency)
Method Detail |
public MonetaryAmount add(MonetaryAmount aMonetaryAmount)
protected UnitAmount createNewUnitAmount(java.lang.Object aValue, java.lang.String aUnit)
public MonetaryAmount divide(java.math.BigDecimal aBigDecimal)
public java.lang.String getCurrency()
public java.math.BigDecimal getValue()
public MonetaryAmount multiply(java.math.BigDecimal aBigDecimal)
public void setValue(java.math.BigDecimal aValue)
public MonetaryAmount subtract(MonetaryAmount aMonetaryAmount)
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.