Here you can find the source of createMap(Map
public static <K, V> Map<K, V> createMap(Map<K, V> map)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { public static <K, V> Map<K, V> createMap(Map<K, V> map) { if (map == null) { return null; }/*from w w w . ja v a2s . co m*/ Map<K, V> result = new HashMap<K, V>(); result.putAll(map); return result; } }