public static Map < String , ISettings > mergeSettings ( Map < String , ISettings > old , Experiment experiment ) { Map < String , ISettings > defaultSettings = makeDefaultSettings ( experiment ) ; old . keySet ( ) . forEach ( key -> defaultSettings . put ( key , old . get ( key ) ) ) ; return defaultSettings ; }
Assumes settings map is ordered top - down in tree order