public static String formatCurrency ( final Number target , final Locale locale ) { Validate . notNull ( locale , "Locale cannot be null" ) ; if ( target == null ) { return null ; } NumberFormat format = NumberFormat . getCurrencyInstance ( locale ) ; return format . format ( target ) ; }
Formats a number as a currency value according to the specified locale .