public static FormatFactory factory ( ) { return new FormatFactory ( ) { @ Override public Format getFormat ( String name , String args , Locale locale ) { Map < String , Format > mt = FormatTables . get ( name ) ; Preconditions . checkArgument ( mt != null , "There's no format instance for [%s]" , name ) ; Format m = mt . get ( ( args == null || args . length ( ) < 1 ) ? FormatNames . DEFAULT : args ) ; Preconditions . checkArgument ( m != null , "There's no signature in [%s] for the given args [%s]" , name , args ) ; return ( ( ConfigurableFormat ) m ) . withLocale ( locale ) ; } } ; }
Creates a factory for the specified format .