List of utility methods to do Currency Format
String | formatCurrency(BigDecimal bd) format Currency return formatCurrency(bd, Locale.US);
|
String | formatCurrency(double amount) format Currency return cashAmount.format(amount);
|
String | formatCurrency(double amount, int precision, Locale locale) format Currency NumberFormat nf = NumberFormat.getCurrencyInstance(locale);
nf.setMinimumFractionDigits(precision);
nf.setMaximumFractionDigits(precision);
return nf.format(amount);
|
String | formatCurrency(double amt) Will format the currency according to the current users locale. return formatCurrency(amt, 2);
|
String | formatCurrency(double num) Formats a number to the currency used on the server. return NumberFormat.getCurrencyInstance(Locale.US).format(num);
|
String | formatCurrency(Double number) Formats double as a string with 2 decimal places DecimalFormat formatter = new DecimalFormat("0.00"); return formatter.format(number); |
String | formatCurrency(Double value) format Currency String result = "0.00"; if (value != null) result = new DecimalFormat(",##0.00").format(value); return result; |
String | formatCurrency(final Double currencyValue, final Locale locale, final boolean isGroup) format Currency String formattedText = null; if (null != currencyValue && null != locale) { final NumberFormat numberFormat = NumberFormat.getCurrencyInstance(locale); numberFormat.setGroupingUsed(isGroup); formattedText = numberFormat.format(currencyValue); return formattedText; |
String | formatCurrency(Float amt) format Currency NumberFormat formatter = NumberFormat.getCurrencyInstance();
return formatter.format(amt);
|
String | formatCurrency(Float f) format Currency return formatFloat(f, FORMAT_CURRENCY);
|