Esempio n. 1
0
 public Ratio dividedBy(Money divisor) {
   assertHasSameCurrencyAs(divisor);
   return Ratio.of(amount, divisor.amount);
 }
Esempio n. 2
0
 public Money plus(Money other) {
   assertHasSameCurrencyAs(other);
   return Money.valueOf(amount.add(other.amount), currency);
 }