public static String format ( ITemplate template , Number number , String pattern , Locale locale ) { if ( null == number ) { throw new NullPointerException ( ) ; } if ( null == locale ) { locale = I18N . locale ( template ) ; } NumberFormat nf ; if ( null == pattern ) nf = NumberFormat . getNumberInstance ( locale ) ; else { DecimalFormatSymbols symbols = new DecimalFormatSymbols ( locale ) ; nf = new DecimalFormat ( pattern , symbols ) ; } return nf . format ( number ) ; }
Format the number with specified template pattern language and locale