Esempio n. 1
0
 protected MoneyAmount divide(MoneyAmount that) {
   Unit<?> unit = unit().divide(that.unit());
   return MoneyAmount.of(((BigDecimal) getNumber()).divide((BigDecimal) that.getNumber()), unit);
 }
Esempio n. 2
0
 protected MoneyAmount times(MoneyAmount that) {
   Unit<?> unit = unit().multiply(that.unit());
   return MoneyAmount.of(((BigDecimal) getNumber()).multiply((BigDecimal) that.getNumber()), unit);
 }