Here you can find the source of mergeConfig(Map
Parameter | Description |
---|---|
userConfig | User configuration values. |
referenceConfig | Reference configuration values. |
private static Map<String, Object> mergeConfig(Map<String, Object> userConfig, Map<String, Object> referenceConfig)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { /**/*from www . j a v a 2s .c o m*/ * Produce a map where the reference values are overridden with user values. * * @param userConfig User configuration values. * @param referenceConfig Reference configuration values. * @return A merge of user and reference configuration. */ private static Map<String, Object> mergeConfig(Map<String, Object> userConfig, Map<String, Object> referenceConfig) { Map<String, Object> config = new HashMap<>(referenceConfig); config.putAll(userConfig); return config; } }