Extending Objects/maps

Extending Objects/maps

Just a tip...

You can extend maps much like you extend an object in javascript. Deluge Script does a great job of overwriting map members when you redeclare a put! Old pairs stay the same new pairs get added. Thanks DS dev team for making this an overwrite method rather than having to remove the key first. :)

  1. map private.editRecordMap(map recordMap, map editMap)
  2. {
  3.     editKeys = editMap.keys();
  4.     for each key in editKeys
  5.     {
  6.         recordMap.put(key,editMap.get(key));
  7.     }
  8.     return recordMap;
  9. }