@Test public void testCreateCustomFormat() throws Exception { MonetaryOperator outOp = (value) -> value.divide(1000000); MonetaryOperator inOp = new MonetaryOperator() { @Override public MonetaryAmount apply(MonetaryAmount value) { return value.multiply(1000000); } }; MonetaryAmountFormat fmt = MonetaryFormats.getAmountFormat( AmountFormatQueryBuilder.of(Locale.ENGLISH).set(CurrencyStyle.SYMBOL) .set("groupingSizes", new int[]{3, 2}).set("pattern", " ##0.00 ¤ Mio;[##0.00] ¤ Mio") .set("displayConversion", outOp).set("parseConversion", inOp).build()); Money m = Money.of(2323233223232424.23, "CHF"); MonetaryAmountFormat toTest = formatting.createCustomFormat(); assertEquals(fmt.format(m), toTest.format(m)); m = Money.of(-2323233223232424.23, "CHF"); assertEquals(fmt.format(m), toTest.format(m)); }
public MonetaryAmountFormat createCustomFormat(){ throw new UnsupportedOperationException(); }
Formatting { public MonetaryAmountFormat createCustomFormat(){ throw new UnsupportedOperationException(); } }
Formatting { public MonetaryAmountFormat createCustomFormat(){ throw new UnsupportedOperationException(); }  }
Formatting { public MonetaryAmountFormat createCustomFormat(){ throw new UnsupportedOperationException(); }  MonetaryAmountFormat getAmountFormat(Locale locale); MonetaryAmountFormat getAmountFormat(AmountFormatContext style); Collection<Locale> getAvailableLocales(); MonetaryAmountFormat createCustomFormat(); String getRegisteredCustomFormat(); }
Formatting { public MonetaryAmountFormat createCustomFormat(){ throw new UnsupportedOperationException(); }  MonetaryAmountFormat getAmountFormat(Locale locale); MonetaryAmountFormat getAmountFormat(AmountFormatContext style); Collection<Locale> getAvailableLocales(); MonetaryAmountFormat createCustomFormat(); String getRegisteredCustomFormat();  }