@Test public void testDivide() { assertEquals(new BigDecimal("0.840336"), UNDER_TEST_ONE.divide(BIG_DECIMAL_1_19).getAmount()); assertEquals(new BigDecimal("1.6667"), Money.valueOf(BIG_DECIMAL_TEN_SCALE, EUR).divide(new BigDecimal(6)).getAmount()); }
public Money divide(BigDecimal divisor) { return divide(divisor, 4); }
Money { public Money divide(BigDecimal divisor) { return divide(divisor, 4); } }
Money { public Money divide(BigDecimal divisor) { return divide(divisor, 4); } private  Money(BigDecimal amount, Currency currency); }
Money { public Money divide(BigDecimal divisor) { return divide(divisor, 4); } private  Money(BigDecimal amount, Currency currency); static Money valueOf(MoneyPO money); static Money valueOf(String amount); static Money valueOf(String amount, Currency currency); static Money valueOf(BigDecimal amount, String currency); static Money valueOf(BigDecimal amount, Currency currency); static Money valueOf(String amount, String currencyCode); boolean isZero(); Money add(Money augend); Money divide(BigDecimal divisor); Money divide(BigDecimal divisor, int additionalScale); Money divide(long divisor); @Override boolean equals(Object obj); BigDecimal getAmount(); Currency getCurrency(); Money round(RoundingMode mode); Money round(); Money stripTrailingZeros(); @Override int hashCode(); Money multiply(BigDecimal multiplicand); Money negate(); Money subtract(Money subtrahend); MoneyPO toMoneyPO(); @Override String toString(); }
Money { public Money divide(BigDecimal divisor) { return divide(divisor, 4); } private  Money(BigDecimal amount, Currency currency); static Money valueOf(MoneyPO money); static Money valueOf(String amount); static Money valueOf(String amount, Currency currency); static Money valueOf(BigDecimal amount, String currency); static Money valueOf(BigDecimal amount, Currency currency); static Money valueOf(String amount, String currencyCode); boolean isZero(); Money add(Money augend); Money divide(BigDecimal divisor); Money divide(BigDecimal divisor, int additionalScale); Money divide(long divisor); @Override boolean equals(Object obj); BigDecimal getAmount(); Currency getCurrency(); Money round(RoundingMode mode); Money round(); Money stripTrailingZeros(); @Override int hashCode(); Money multiply(BigDecimal multiplicand); Money negate(); Money subtract(Money subtrahend); MoneyPO toMoneyPO(); @Override String toString(); static final Money NOTHING; static final Money ONE_USD; }