question: private Map < String , ExtensionFileFilter > addExtensions ( JFileChooser chooser ) { Map < String , ExtensionFileFilter > filters = new HashMap < String , ExtensionFileFilter > ( ) ; for ( Map . Entry < String , String > entry : exts . entrySet ( ) ) { ExtensionFileFilter filter = new ExtensionFileFilter ( entry . getKey ( ) , entry . getValue ( ) ) ; filters . put ( entry . getKey ( ) , filter ) ; chooser . addChoosableFileFilter ( filter ) ; } return filters ; }
target:  Adds the filters for the extensions to the provided chooser.