MCPcopy Create free account
hub / github.com/PCGen/pcgen / putAll

Method putAll

PCGen-base/code/src/java/pcgen/base/util/DoubleKeyMap.java:207–214  ·  view source on GitHub ↗

Copies the key/value combinations from the given DoubleKeyMap into this DoubleKeyMap. If this DoubleKeyMap already contained a mapping for the any of the key combinations in the given DoubleKeyMap, the previous value is overwritten. No reference is maintained to the internal structure of the given

(DoubleKeyMap<K1, K2, V> dkm)

Source from the content-addressed store, hash-verified

205 * if the given DoubleKeyMap is null
206 */
207 public final void putAll(DoubleKeyMap<K1, K2, V> dkm)
208 {
209 for (Map.Entry<K1, Map<K2, V>> me : dkm.map.entrySet())
210 {
211 Map<K2, V> localMap = map.computeIfAbsent(me.getKey(), k -> createLocalMap());
212 localMap.putAll(me.getValue());
213 }
214 }
215
216 /**
217 * If the specified key is not already associated with a value (or is null), computes

Callers 12

testDKMputAllOneClearMethod · 0.95
testDKMputAllTwoClearMethod · 0.95
testPutAllNullMethod · 0.95
DoubleKeyMapMethod · 0.95
getMapForMethod · 0.45
FormulaSemanticsMethod · 0.45
getWithMethod · 0.45
getWithMethod · 0.45

Calls 5

createLocalMapMethod · 0.95
getKeyMethod · 0.65
getValueMethod · 0.65
entrySetMethod · 0.45
computeIfAbsentMethod · 0.45

Tested by 7

testDKMputAllOneClearMethod · 0.76
testDKMputAllTwoClearMethod · 0.76
testPutAllNullMethod · 0.76