@Test public void testGetBigDecimal_double() { expectThrows(ArithmeticException.class, () -> getBigDecimal(Double.NaN)); expectThrows(ArithmeticException.class, () -> getBigDecimal(Double.POSITIVE_INFINITY)); expectThrows(ArithmeticException.class, () -> getBigDecimal(Double.NEGATIVE_INFINITY)); assertEquals(getBigDecimal(0.24D), new BigDecimal("0.24")); assertEquals(getBigDecimal(0.25F), new BigDecimal("0.25")); }
public static BigDecimal getBigDecimal(long num) { return BigDecimal.valueOf(num); }
MoneyUtils { public static BigDecimal getBigDecimal(long num) { return BigDecimal.valueOf(num); } }
MoneyUtils { public static BigDecimal getBigDecimal(long num) { return BigDecimal.valueOf(num); } private  MoneyUtils(); }
MoneyUtils { public static BigDecimal getBigDecimal(long num) { return BigDecimal.valueOf(num); } private  MoneyUtils(); static BigDecimal getBigDecimal(long num); static BigDecimal getBigDecimal(double num); static BigDecimal getBigDecimal(Number num); static BigDecimal getBigDecimal(Number num, MonetaryContext moneyContext); static MathContext getMathContext(MonetaryContext monetaryContext, RoundingMode defaultMode); static void checkAmountParameter(MonetaryAmount amount, CurrencyUnit currencyUnit); static void checkNumberParameter(Number number); static String replaceNbspWithSpace(String s); }
MoneyUtils { public static BigDecimal getBigDecimal(long num) { return BigDecimal.valueOf(num); } private  MoneyUtils(); static BigDecimal getBigDecimal(long num); static BigDecimal getBigDecimal(double num); static BigDecimal getBigDecimal(Number num); static BigDecimal getBigDecimal(Number num, MonetaryContext moneyContext); static MathContext getMathContext(MonetaryContext monetaryContext, RoundingMode defaultMode); static void checkAmountParameter(MonetaryAmount amount, CurrencyUnit currencyUnit); static void checkNumberParameter(Number number); static String replaceNbspWithSpace(String s); static final String NBSP_STRING; static final String NNBSP_STRING; static final char NBSP; static final char NNBSP; }