public static void addQualityOfSolutionToGroup(Solution sol, String initialElementName, Map<String, Object> groups) {

      Map<String, Object> expectedQuality = createMapOfExpectedQuality(sol);

      Map<String, Object> groupInfo = YAMLgroupsOptimizerParser.findGroupOfMemberName(initialElementName, groups);

      List<Object> policies = null;
      if (groupInfo.containsKey(TOSCAkeywords.GROUP_ELEMENT_POLICY_TAG)) {
         policies = (List<Object>) groupInfo.get(TOSCAkeywords.GROUP_ELEMENT_POLICY_TAG);
      } else {
         policies = new ArrayList<Object>();
         groupInfo.put(TOSCAkeywords.GROUP_ELEMENT_POLICY_TAG, policies);
      }

      policies.add(expectedQuality);

   }
public static void addQualityOfSolutionToGroup ( Solution sol , String initialElementName , Map < String , Object > groups ) { Map < String , Object > expectedQuality = createMapOfExpectedQuality ( sol ) ; Map < String , Object > groupInfo = YAMLgroupsOptimizerParser . findGroupOfMemberName ( initialElementName , groups ) ; List < Object > policies = null ; if ( groupInfo . containsKey ( TOSCAkeywords . GROUP_ELEMENT_POLICY_TAG ) ) { policies = ( List < Object > ) groupInfo . get ( TOSCAkeywords . GROUP_ELEMENT_POLICY_TAG ) ; } else { policies = new ArrayList < Object > ( ) ; groupInfo . put ( TOSCAkeywords . GROUP_ELEMENT_POLICY_TAG , policies ) ; } policies . add ( expectedQuality ) ; }
@param sol
@param initialElementName
@param groups
It adds to the groups where "moduleName" is member an entry in
its policies with the expected quality of the solution