Here you can find the source of putAll(Map
public static <R> Map<String, R> putAll(Map<String, R> model, String prefix, Map<String, R> subModel)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <R> Map<String, R> putAll(Map<String, R> model, String prefix, Map<String, R> subModel) { for (Map.Entry<String, R> e : subModel.entrySet()) { model.put(prefix + "." + e.getKey(), e.getValue()); }/*from w ww .java 2s. c o m*/ return model; } }