Here you can find the source of getSizeFormat()
private static NumberFormat getSizeFormat()
//package com.java2s; import java.text.NumberFormat; public class Main { private static ThreadLocal<NumberFormat> sNumberFormat = new ThreadLocal<NumberFormat>() { protected NumberFormat initialValue() { NumberFormat format = NumberFormat.getNumberInstance(); // TODO: Consider making this locale/platform specific, OR a method parameter... // format.setMaximumFractionDigits(2); format.setMaximumFractionDigits(0); return format; }/*from w w w . j a v a 2 s .co m*/ }; private static NumberFormat getSizeFormat() { return sNumberFormat.get(); } }