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

7
LINES

< > BotCompany Repo | #1020210 // multiMapToPairs

JavaX fragment (include)

1  
static <A, B> LPair<A, B> multiMapToPairs(MultiMap<A, B> mm) {
2  
  LPair<A, B> out = new L;
3  
  for (A key : keys(mm))
4  
    for (B value : mm.get(key))
5  
      out.add(pair(key, value));
6  
  ret out;
7  
}

Author comment

Began life as a copy of #1016465

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020210
Snippet name: multiMapToPairs
Eternal ID of this version: #1020210/2
Text MD5: 961f38f2f4929501ac29f9b6ece5ab38
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-10 15:48:12
Source code size: 198 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 388 / 430
Version history: 1 change(s)
Referenced in: [show references]