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

7
LINES

< > BotCompany Repo | #1005171 // reverseMultiMapAsMap

JavaX fragment (include)

static <A, B> Map<B, A> reverseMultiMapAsMap(MultiMap<A, B> mm) {
  new HashMap<B, A> map;
  for (A a : mm.keys())
    for (B b : mm.get(a))
      map.put(b, a);
  ret map;
}

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: #1005171
Snippet name: reverseMultiMapAsMap
Eternal ID of this version: #1005171/1
Text MD5: 351385cc8686c78dbd769f1c856c454d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-18 19:22:50
Source code size: 180 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 481 / 470
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1023300 - reversePseudoMultiMapAsCIMap