public static Map < String , List < String > > deduplicateFormats ( Format format ) { Map < String , List < String > > res = new LinkedHashMap <> ( ) ; mapAdd ( res , format . short_ , "SHORT" ) ; mapAdd ( res , format . medium , "MEDIUM" ) ; mapAdd ( res , format . long_ , "LONG" ) ; mapAdd ( res , format . full , "FULL" ) ; return res ; }
De - duplication of formats .