Java Map Put putAll(Map model, String prefix, Map subModel)

Here you can find the source of putAll(Map model, String prefix, Map subModel)

Description

put All

License

Open Source License

Declaration

public static <R> Map<String, R> putAll(Map<String, R> model, String prefix, Map<String, R> subModel) 

Method Source Code

//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;
    }
}

Related

  1. putAll(M map, Iterable> values)
  2. putAll(Map original, Map... others)
  3. putAll(Map dest, Collection src, V value)
  4. putAll(Map map, Map otherMap)
  5. putAll(Map map, Object... keysAndValues)
  6. putAll(Map map, String prefix, Map values)
  7. putAllIfAbsent(final Map target, final Map source)
  8. putAllIfNew(Map dest, Map source)
  9. putAllIfNotNull(final Map map, final Map m)