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