Java Properties mergePropertiesIntoMap(Properties props, Map map)

Here you can find the source of mergePropertiesIntoMap(Properties props, Map map)

Description

merge Properties Into Map

License

Apache License

Declaration

public static void mergePropertiesIntoMap(Properties props, Map map) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static void mergePropertiesIntoMap(Properties props, Map map) {
        if (map == null) {
            throw new IllegalArgumentException("Map must not be null");
        } else {//from   w ww.  j av  a2  s  .  co m
            if (props != null) {
                Enumeration en = props.propertyNames();

                while (en.hasMoreElements()) {
                    String key = (String) en.nextElement();
                    map.put(key, props.getProperty(key));
                }
            }

        }
    }
}

Related

  1. extractFromPropertiesAsMap(String prefix, Properties properties)
  2. isKeySame(String key, Properties p1, Properties p2)
  3. isSupportedJVM(Map jdkProperties)
  4. maskApplicationEnvProperties(Map environmentVariables, Set variablesToMask)
  5. mergePropertiesIntoMap(Properties props, Map map)
  6. mergeSystemProperties(Properties properties)
  7. propertiesToJson(Properties properties)
  8. propertiesToMap(Properties props)
  9. putAll(final Map props, final Properties p)