/** * Creates a new instance, targeting the given {@link javax.money.CurrencyUnit}. * * @param currencyUnit the target currency, not null. */ protected DefaultMonetarySummaryStatistics(CurrencyUnit currencyUnit) { empty = FastMoney.of(0, Objects.requireNonNull(currencyUnit)); setSameMonetary(empty); }
/** @param args */ public static void main(String[] args) { Money amt1 = Money.of(10.1234556123456789, "USD"); FastMoney amt2 = FastMoney.of(123456789, "USD"); Money total = amt1.add(amt2); System.out.println(total); }