List of utility methods to do Locale Format
String | formatDecimal(BigInteger b) format Decimal Locale loc = new Locale("nl", "NL", "EURO"); NumberFormat n = NumberFormat.getCurrencyInstance(loc); double doublePayment = b.doubleValue(); n.setMaximumFractionDigits(0); String s = n.format(doublePayment); return s; |
String | formatDecimalDisplay(final double _numberToFormat, final String _formatToApply) Utility function for applying formatting to numbers. String formattedNumber; try { DecimalFormat decimalFormatForDisplay = new DecimalFormat(_formatToApply, new DecimalFormatSymbols(Locale.US)); formattedNumber = decimalFormatForDisplay.format(_numberToFormat); } catch (Exception e) { formattedNumber = new Double(_numberToFormat).toString(); return formattedNumber; |
Double | formatDouble(double in) format Double return Double.parseDouble(formatDoubleToString(in));
|
String | formatDouble(double inVal, int inDecs) Formats a double value to specified number of decimal places runs through the internationalized NumberFormat, so may NOT do scientific notation return formatDouble(inVal, inDecs, 14);
|
String | formatDouble(Double localDouble, int scale) Formate un double if (scale != formaterScale) initializeDecimalFormat(scale); return decimalFormater.format(localDouble); |
String | formatDouble(double number) Formats double - show max 9 fraction digits NumberFormat format = DecimalFormat.getInstance(Locale.US);
format.setMaximumFractionDigits(9);
format.setGroupingUsed(false);
return format.format(number);
|
String | formatDouble(double v) Method to convert a double to a string. return formatDouble(v, 3);
|
String | formatDouble(double val, String format) format Double final DecimalFormat formatter = new DecimalFormat(format, new DecimalFormatSymbols(Locale.ENGLISH)); return formatter.format(val); |
String | formatDouble(Double valor, int decimal) Formata um Double if (valor == null) { return null; NumberFormat format = NumberFormat.getInstance(new Locale("pt", "BR")); format.setMaximumFractionDigits(decimal); format.setMinimumFractionDigits(decimal); return format.format(valor); |
String | formatDouble(double value) format Double java.math.BigDecimal bigVal = new java.math.BigDecimal(value); java.text.NumberFormat n = java.text.NumberFormat.getInstance(java.util.Locale.US); String retString = n.format(value); return retString; |