Search in sources :

Example 1 with AmountFormatQueryBuilder

use of javax.money.format.AmountFormatQueryBuilder in project bookJava11eDeitel by diodoros87.

the class SimpleCurrencyConverterView method getMonetaryAmountFormat.

private static MonetaryAmountFormat getMonetaryAmountFormat() {
    AmountFormatQueryBuilder builder = AmountFormatQueryBuilder.of(LOCALE_FORMAT);
    builder.set(SYMBOL);
    builder.set(PATTERN, " ยค,##0.00");
    AmountFormatQuery query = builder.build();
    MonetaryAmountFormat monetaryAmountFormat = MonetaryFormats.getAmountFormat(query);
    return monetaryAmountFormat;
}
Also used : AmountFormatQueryBuilder(javax.money.format.AmountFormatQueryBuilder) AmountFormatQuery(javax.money.format.AmountFormatQuery) MonetaryAmountFormat(javax.money.format.MonetaryAmountFormat)

Aggregations

AmountFormatQuery (javax.money.format.AmountFormatQuery)1 AmountFormatQueryBuilder (javax.money.format.AmountFormatQueryBuilder)1 MonetaryAmountFormat (javax.money.format.MonetaryAmountFormat)1