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

6
LINES

< > BotCompany Repo | #1028710 // reverseKeys - return LinkedHashMap with keys in reverse order

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

Libraryless. Click here for Pure Java version (2497L/16K).

1  
static <A, B> Map<A, B> reverseKeys(Map<A, B> map) {
2  
  new LinkedHashMap<A, B> map2;
3  
  for (A a : reversed(keys(map)))
4  
    map2.put(a, map.get(a));
5  
  ret map2;
6  
}

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: #1028710
Snippet name: reverseKeys - return LinkedHashMap with keys in reverse order
Eternal ID of this version: #1028710/3
Text MD5: 89927dd2e5236f97d3540db882e6eb47
Transpilation MD5: ab9a71950a1c4654edc77f0da4b9c111
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-05 23:59:50
Source code size: 166 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 190 / 283
Version history: 2 change(s)
Referenced in: [show references]