public interface RoundingStrategy
| Modifier and Type | Method and Description |
|---|---|
Money |
divide(Money money,
java.math.BigDecimal factor)
Divide price by factor
|
Money |
getPercentValue(Money price,
Percentage percent)
Returns for the given
Percentage amount the calculated amount in Money. |
Money |
multiply(Money money,
java.math.BigDecimal factor)
Multiply the given money by given factor.
|
Money |
roundToMoney(java.math.BigDecimal amount,
Currency currency)
Creates a
Money object based on the given BigDecimal amount. |
Money divide(Money money, java.math.BigDecimal factor)
money - to divide forfactor - to divide byMoney multiply(Money money, java.math.BigDecimal factor)
money - to multiple forfactor - to multiple byMoney getPercentValue(Money price, Percentage percent)
Percentage amount the calculated amount in Money. E.g. 25% of 10.01Euro
result in 2.50europrice - the pricepercent - the percentage of the price to take.Money roundToMoney(java.math.BigDecimal amount, Currency currency)
Money object based on the given BigDecimal amount. Based on the implementation the amount is
round up/down to fit into the money.amount - the amount to be convertedcurrency - based on the currency digits the amount is round up/downCopyright © 2018 SAP SE. All Rights Reserved.