List of utility methods to do Fraction Format
String | format(double d) format return formatter.format(d);
|
String | format(double d) decides format for all doubles displayed and uses nice formatting if value is greater than 1e-03. if (Math.abs(d) > 0.001) { return getValueFormatter().format(d); } else { return "" + d; |
String | format(double d, DecimalFormat unitFormatter) format final double rounded = roundDoubleToDecimals(d, unitFormatter.getMaximumFractionDigits()); return unitFormatter.format(rounded); |
String | format(Double d, int digit) Formats a double to string. if (d == null) { return ""; StringBuffer sb = new StringBuffer(); sb.append("#"); for (int i = 0; i < digit; i++) { if (i == 0) { sb.append("."); ... |
String | format(double d, java.text.NumberFormat format) format synchronized (format) { return format.format(d); |
String | format(double degrees) Remove decimal point from value and return its string representation double dVal = degrees; DecimalFormat form = new DecimalFormat("###0.000000"); return form.format(dVal); |
String | format(double input, String format) Formats a number in a specified pattern. DecimalFormat decimalFormat = new DecimalFormat(format); return decimalFormat.format(input); |
String | format(double n) Formats the given number into a price. NumberFormat formatter; String number; formatter = new DecimalFormat("#,###,###,###.00"); number = formatter.format(n); if (currency.length() == 1) { return currency + number; } else { return number + " " + currency; ... |
String | format(double no, String formatter) Formats a number to the specific formatter stirng. DecimalFormat df = new DecimalFormat(formatter); return df.format(no); |
String | format(double num) format return new DecimalFormat(",###").format(num); |