Here you can find the source of mergeMap(Map map, Object[]... pairs)
@SuppressWarnings("unchecked") public static Map mergeMap(Map map, Object[]... pairs)
//package com.java2s; import java.util.HashMap; import java.util.Map; public class Main { /**//from w w w . j av a 2 s .c o m * Merges the map with the new value and returns a new map. */ @SuppressWarnings("unchecked") public static Map mergeMap(Map map, Object[]... pairs) { if (map == null) { map = new HashMap(); } Map newMap = new HashMap(map); for (Object[] pair : pairs) { newMap.put(pair[0], pair[1]); } return newMap; } }