Java Currency Format getCurrencyFormat(final Locale locale)

Here you can find the source of getCurrencyFormat(final Locale locale)

Description

get Currency Format

License

Open Source License

Declaration

public static NumberFormat getCurrencyFormat(final Locale locale) 

Method Source Code

//package com.java2s;
// ProjectForge is dual-licensed.

import java.text.NumberFormat;

import java.util.Locale;

public class Main {
    public static NumberFormat getCurrencyFormat(final Locale locale) {
        return getNumberFraction2Format(locale);
    }//  w  w w .  j  av  a2s. c om

    public static NumberFormat getNumberFraction2Format(final Locale locale) {
        final NumberFormat format = NumberFormat.getNumberInstance(locale);
        format.setMaximumFractionDigits(2);
        format.setMinimumFractionDigits(2);
        return format;
    }
}

Related

  1. formatCurrency(Number currencyValue)
  2. formatCurrency(Object value)
  3. formatCurrency(String currency)
  4. formatCurrencyWithCurrencyUnit(double amt, int fractionDigits)
  5. getCurrencyFormat()
  6. getCurrencyFormatter()
  7. parseCurrency(String currency)
  8. removeTrailingZeroes(BigDecimal value, boolean isCurrency)
  9. roundToCurrencyString(double amount)