@Test public void shouldRoundingUsingScale() { CurrencyUnit euro = Monetary.getCurrency("EUR"); MonetaryAmount money = Money.parse("EUR 2.355432"); MonetaryAmount result = MonetaryOperators.rounding(4).apply(money); assertNotNull(result); assertEquals(result.getCurrency(), euro); assertEquals(2.3554d, result.getNumber().doubleValue()); }
public static MonetaryOperator rounding() { return ROUNDING_MONETARY_AMOUNT; }
MonetaryOperators { public static MonetaryOperator rounding() { return ROUNDING_MONETARY_AMOUNT; } }
MonetaryOperators { public static MonetaryOperator rounding() { return ROUNDING_MONETARY_AMOUNT; } private  MonetaryOperators(); }
MonetaryOperators { public static MonetaryOperator rounding() { return ROUNDING_MONETARY_AMOUNT; } private  MonetaryOperators(); static MonetaryOperator reciprocal(); static MonetaryOperator permil(BigDecimal decimal); static MonetaryOperator permil(Number number); static MonetaryOperator permil(Number number, MathContext mathContext); static MonetaryOperator percent(BigDecimal decimal); static MonetaryOperator percent(Number number); static MonetaryOperator minorPart(); static MonetaryOperator majorPart(); static MonetaryOperator rounding(); static MonetaryOperator rounding(RoundingMode roundingMode); static MonetaryOperator rounding(RoundingMode roundingMode, int scale); static MonetaryOperator rounding(int scale); }
MonetaryOperators { public static MonetaryOperator rounding() { return ROUNDING_MONETARY_AMOUNT; } private  MonetaryOperators(); static MonetaryOperator reciprocal(); static MonetaryOperator permil(BigDecimal decimal); static MonetaryOperator permil(Number number); static MonetaryOperator permil(Number number, MathContext mathContext); static MonetaryOperator percent(BigDecimal decimal); static MonetaryOperator percent(Number number); static MonetaryOperator minorPart(); static MonetaryOperator majorPart(); static MonetaryOperator rounding(); static MonetaryOperator rounding(RoundingMode roundingMode); static MonetaryOperator rounding(RoundingMode roundingMode, int scale); static MonetaryOperator rounding(int scale);  }