MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / putAll

Method putAll

src/main/java/field/utility/Dict.java:574–582  ·  view source on GitHub ↗

returns a dict of the things displaced by putting this

(Dict d)

Source from the content-addressed store, hash-verified

572 * returns a dict of the things displaced by putting this
573 */
574 public Dict putAll(Dict d) {
575 Dict r = new Dict();
576 for (Map.Entry<Prop, Object> e : d.dictionary.entrySet()) {
577 Object was = get(e.getKey());
578 put(e.getKey(), e.getValue());
579 if (was != null) r.put(e.getKey(), was instanceof Mutable ? ((Mutable) was).duplicate() : was);
580 }
581 return r;
582 }
583
584 /**
585 * putAll with a chance to handle collisions. Function3<Key, Object_here, Object_there, Object_or_null_as_merged>

Callers 15

renderStaticMethod · 0.80
copyMethod · 0.80
threadMethod · 0.80
call_runnableMethod · 0.80
callMethod · 0.80
callFunctionMethod · 0.80
KeyboardShortcutsMethod · 0.80
makeCommandMethod · 0.80
DispatchMethod · 0.80
arcMethod · 0.80
growTimeForMethod · 0.80
enterMethod · 0.80

Calls 7

getMethod · 0.95
putMethod · 0.95
duplicateMethod · 0.65
applyMethod · 0.65
getMethod · 0.65
getValueMethod · 0.45
containsKeyMethod · 0.45

Tested by

no test coverage detected