Java examples for java.util:Map Operation
merged Map
//package com.java2s; import java.util.*; public class Main { public static <K, V> Map<K, V> mergedMap(Map<K, ? extends V> base, Map<K, ? extends V> overrides) { Map<K, V> map = new HashMap<>(); map.putAll(base);/*from w ww. j a va 2 s. c om*/ map.putAll(overrides); return map; } }