static void putIfNotSet ( Map < String , String > target , Map < String , String > defaults ) { for ( final String key : defaults . keySet ( ) ) { if ( ! target . containsKey ( key ) ) { target . put ( key , defaults . get ( key ) ) ; } } }
Update a given map with some default values if not already present in map .