Here you can find the source of copy(Map dest, Map src)
@SuppressWarnings({ "unchecked", "rawtypes" }) public static void copy(Map dest, Map src)
//package com.java2s; //License from project: Open Source License import java.util.Map; public class Main { @SuppressWarnings({ "unchecked", "rawtypes" }) public static void copy(Map dest, Map src) { for (Object k : src.keySet()) { Object v = src.get(k); dest.put(k, v);/* w w w .j av a2 s . c om*/ } } }