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


< > 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).

static <A, B> Map<A, B> reverseKeys(Map<A, B> map) {
  new LinkedHashMap<A, B> map2;
  for (A a : reversed(keys(map)))
    map2.put(a, map.get(a));
  ret map2;

download  show line numbers  debug dex   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, 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: 33 / 65
Version history: 2 change(s)
Referenced in: [show references]

Formerly at &