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

9
LINES

< > BotCompany Repo | #1004896 // orderMapByDescendingValue

JavaX fragment (include)

// return a fancy litorderedmap
static <A, B> Map<A, B> orderMapByDescendingValue(final Map<A, B> map) {
  L<A> l = new ArrayList(map.keySet());
  sort(l, mapComparatorDesc(map));
  Map<A, B> map2 = litorderedmap();
  for (A a : l)
    map2.put(a, map.get(a));
  ret map2;
}

Author comment

Began life as a copy of #1002585

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: #1004896
Snippet name: orderMapByDescendingValue
Eternal ID of this version: #1004896/3
Text MD5: 3cf78fb07dfbfadf1dc6ad792d2d4757
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-26 11:59:38
Source code size: 282 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 558 / 563
Version history: 2 change(s)
Referenced in: [show references]