Here you can find the source of copyOf(final Map
public static <K, V> Map<K, V> copyOf(final Map<K, V> map)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static <K, V> Map<K, V> copyOf(final Map<K, V> map) { final Map<K, V> copy = new LinkedHashMap<>(); copy.putAll(map);/* w ww . ja v a 2 s . c o m*/ return copy; } }