Java Utililty Methods Currency Format

List of utility methods to do Currency Format

Description

The list of methods to do Currency Format are organized into topic(s).

Method

StringroundToCurrencyString(double amount)
round To Currency String
NumberFormat myFormatter = NumberFormat.getNumberInstance();
myFormatter.setMinimumFractionDigits(2);
myFormatter.setMaximumFractionDigits(2);
myFormatter.setGroupingUsed(false);
return myFormatter.format(amount);
StringtoCurrency(Object objectValue)
Parse double value to currency format (default Locale("es", "ES"))
return toCurrency(objectValue, DEF_LOCALE_NUMBER);
StringtoCurrencyAmountStr(Long microAmount)
Converts micro amount to currency amount.
double normalAmount = (double) microAmount / MICRO_MULTIPLIER;
return df.format(normalAmount);
StringtoCurrencyFormat(String input)
to Currency Format
if (input.indexOf(".") != -1)
    return NumberFormat.getCurrencyInstance().format((new java.lang.Double(input)).doubleValue());
else {
    return NumberFormat.getCurrencyInstance().format((new java.lang.Long(input)).longValue());
StringtoCurrencyFormat(String pattern, double value)
This method actually does all for number formatting into Currency
DecimalFormat formatter = new DecimalFormat(pattern);
return formatter.format(value);
StringtoCurrencyWord(Double doubleValue, Locale locale)
Parse double value to currency format
String value;
NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
numberFormat.setMinimumFractionDigits(0);
numberFormat.setMaximumFractionDigits(0);
if (doubleValue == null) {
    value = numberFormat.format(new Double(0));
} else {
    value = numberFormat.format(doubleValue);
...