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

7
LINES

< > BotCompany Repo | #1016375 // reverseMultiMapCI

JavaX fragment (include)

1  
static <A> MultiMap<S, A> reverseMultiMapCI(MultiMap<A, S> map) {
2  
  MultiMap<S, A> mm = (MultiMap) ciMultiMap();
3  
  for (A key : keys(map))
4  
    for (S value : map.get(key))
5  
      mm.put(value, key);
6  
  ret mm;
7  
}

Author comment

Began life as a copy of #1004754

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016375
Snippet name: reverseMultiMapCI
Eternal ID of this version: #1016375/3
Text MD5: 5f5d15b565a4f87aa996d97f2db07281
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-18 13:34:48
Source code size: 215 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 346 / 378
Version history: 2 change(s)
Referenced in: [show references]