Here you can find the source of putMultiEntry(Map
public static <K, V> void putMultiEntry(Map<K, V> map, Iterable<K> keys, V value)
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { /**//from w w w. ja va 2 s. c o m * Convenient method to put several entry in a map having the same value at once. */ public static <K, V> void putMultiEntry(Map<K, V> map, Iterable<K> keys, V value) { for (final K key : keys) { map.put(key, value); } } }