code: public static Map<String, Configuration> getAllNamedConfiguration(Configuration conf) {
          List<Configuration> toProcess = new ArrayList<Configuration>();
          Map<String, Configuration> map = new HashMap<String, Configuration>();
          toProcess.add(conf);
          while (!toProcess.isEmpty()) {
              Configuration current = toProcess.remove(0);
              if (current instanceof ConcurrentCompositeConfiguration) {
                  ConcurrentCompositeConfiguration composite = (ConcurrentCompositeConfiguration) current;
                  for (String name: composite.getConfigurationNames()) {
                      map.put(name, composite.getConfiguration(name));
                  }
                  for (Configuration c: composite.getConfigurations()) {
                      toProcess.add(c);
                  }
              } else if (current instanceof CombinedConfiguration) {
                  CombinedConfiguration combined = (CombinedConfiguration) current;
                  for (String name: (Set<String>) combined.getConfigurationNames()) {
                      map.put(name, combined.getConfiguration(name));
                  }
                  for (int i = 0; i < combined.getNumberOfConfigurations(); i++) {
                      toProcess.add(combined.getConfiguration(i));
                  }
              }
          }
          return map;
      }
docs: Gets all named sub-configuration from a configuration in a map. This method examines each sub-configuration
  which is an instance of {@link ConcurrentCompositeConfiguration} or CombinedConfiguration and extract the
  named configurations out of them.
  
  @param conf Configuration to get all the named sub-configurations
  @return map where key is the name of the sub-configuration and value is the sub-configuration