public interface CurrencyAmount
Modifier and Type | Method and Description |
---|---|
CurrencyAmount |
add(CurrencyAmount money)
Add the amount with the existing one and return a MonetaryAmount (implementation could make it immutable and return a new entity)
|
BigDecimal |
getAmount() |
String |
getCurrency() |
CurrencyAmount |
negate()
Swap the sign on the amount and return a MonetaryAmount (implementation could make it immutable and return a new entity)
|
CurrencyAmount |
subtract(CurrencyAmount money)
Subtract the amount from the existing one and return a MonetaryAmount (implementation could make it immutable and return a new entity)
|
String getCurrency()
BigDecimal getAmount()
CurrencyAmount negate()
CurrencyAmount add(CurrencyAmount money)
IllegalArgumentException
- if the money.currency does not match the current one.CurrencyAmount subtract(CurrencyAmount money)
IllegalArgumentException
- if the money.currency does not match the current one.Copyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.