Here you can find the source of getDataFormat(final boolean grouped, final boolean isFloat, int declen)
static final public String getDataFormat(final boolean grouped, final boolean isFloat, int declen)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; public class Main { static final public String getDataFormat(final boolean grouped, final boolean isFloat, int declen) { DecimalFormat nf = new DecimalFormat(); nf.setGroupingUsed(grouped);// w w w . jav a2s.c o m if (!isFloat) declen = 0; nf.setMaximumFractionDigits(declen); nf.setMinimumFractionDigits(declen); return nf.toPattern(); } }