public class MonetaryAmount extends UnitAmount
Constructor and Description |
---|
MonetaryAmount(java.math.BigDecimal aValue, java.lang.String aCurrency)
MonetaryAmount constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public MonetaryAmount(java.math.BigDecimal aValue, java.lang.String aCurrency)
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)