private String fmtNumber ( final double d ) { if ( Double . compare ( d % 1 , 0 ) == 0 ) { return String . format ( "%d" , ( int ) d ) ; } else { return String . format ( "%.2f" , d ) ; } }
Fmt number .