List of utility methods to do Locale Format
String | formatFloat(float f, int numDecPlaces, boolean forceFractions) Formats the given float to a String with the specified number of decimal places. return (formatFloat(f, numDecPlaces, forceFractions, false));
|
String | formatFloat(Float f, int style) format Float String num = new String("0"); if (f != null) num = new String(f.toString()); else return ""; NumberFormat nf = null; switch (style) { case FORMAT_INTEGER: { ... |
String | formatFloat(float val) Formats a float to String and prevents scientific notation return FLOAT_FMT.format(new Object[] { new Float(val) }); |
String | formatFraction2(final Number value) format Fraction final Locale locale = Locale.getDefault(); final NumberFormat format = getNumberFraction2Format(locale); return format.format(value); |
String | formatInCurrentDefaultLocale(double d) format In Current Default Locale return format(d, java.text.NumberFormat.getNumberInstance());
|
Object | formatingDecimalNumber(Object obj, Locale locale, int maxIntPart, int maxFloatPart) formatting the object (obj) to a bigDecimal taking into account the locale Object result = obj; NumberFormat numberFormat = settingUpValuesOfFormat(locale, maxIntPart, maxFloatPart); try { Double number = new Double(obj.toString()); result = numberFormat.format(number.doubleValue()); } catch (NumberFormatException e) { return result; ... |
String | formatInt(final int number) Format the given int to a int with ,'s in it. final NumberFormat formater = NumberFormat.getInstance(Locale.UK); return formater.format(number); |
String | formatInteger(int input) format Integer NumberFormat formatter = NumberFormat.getInstance(new Locale("en_US")); return formatter.format(input); |
String | formatInteger(Long num) format Integer return NumberFormat.getInstance(Locale.US).format(num.longValue());
|
String | formatIntWithCommas(int num) format Int With Commas return NumberFormat.getNumberInstance(Locale.US).format(num);
|