private static Map<String,String> resourceBundleMap(ResourceBundle bundle){
  final HashMap<String,String> map=new HashMap<String,String>();
  final Enumeration<String> e=bundle.getKeys();
  while (e.hasMoreElements()) {
    final String key=e.nextElement();
    map.put(key,(String)bundle.getObject(key));
  }
  return Collections.unmodifiableMap(map);
}

private static Map < String , String > resourceBundleMap ( ResourceBundle bundle ) { final HashMap < String , String > map = new HashMap < String , String > ( ) ; final Enumeration < String > e = bundle . getKeys ( ) ; while ( e . hasMoreElements ( ) ) { final String key = e . nextElement ( ) ; map . put ( key , ( String ) bundle . getObject ( key ) ) ; } return Collections . unmodifiableMap ( map ) ; }
returns an unmodifiable map of the given bundle .
