Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1004287 // mergeMaps - add maps together

JavaX fragment (include)

1  
static <A, B> Map<A, B> mergeMaps(Map<A, B>... maps) {
2  
  Map<A, B> map = null;
3  
  for (Map<A, B> m : maps) {
4  
    if (map == null) map = similarEmptyMap(m);
5  
    map.putAll(m);
6  
  }
7  
  ret map;
8  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004287
Snippet name: mergeMaps - add maps together
Eternal ID of this version: #1004287/2
Text MD5: bee8bd6dc693e1f2e6329b266f74a73a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-25 22:27:59
Source code size: 197 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 596 / 595
Version history: 1 change(s)
Referenced in: [show references]