returns a dict of the things displaced by putting this
(Dict d)
| 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> |
no test coverage detected