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

7
LINES

< > BotCompany Repo | #1027785 // pairKeysToMapOfMap

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Compilation Failed (2507L/16K).

1  
static <A, B, C> Map<A, Map<B, C>> pairKeysToMapOfMap(Map<Pair<A, B>, C> map) {
2  
  if (map == null) null;
3  
  new Map<A, Map<B, C>> out;
4  
  for (Pair<A, B> key, C value : map)
5  
    mapGetOrCreateHashMap(out, key.a).put(key.b, value);
6  
  ret out;
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027785
Snippet name: pairKeysToMapOfMap
Eternal ID of this version: #1027785/4
Text MD5: 056ff988ff78ef53a8bc7f102418f114
Transpilation MD5: 9570eb3718ee093cf1c30e169f254d55
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-11 19:32:27
Source code size: 247 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 130 / 199
Version history: 3 change(s)
Referenced in: [show references]