1 | static <A, B> LinkedHashMap<A, B> mapSortedByValueDesc(final Map<A, B> map) { |
2 | L<A> l = new ArrayList(map.keySet()); |
3 | sortDesc(l, mapComparator(map)); |
4 | LinkedHashMap<A, B> map2 = litorderedmap(); |
5 | for (A a : l) |
6 | map2.put(a, map.get(a)); |
7 | ret map2; |
8 | } |
Began life as a copy of #1007624
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018646 |
Snippet name: | mapSortedByValueDesc |
Eternal ID of this version: | #1018646/1 |
Text MD5: | 99e852a6a586f1743d1d32eeae2254a8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-08 03:10:17 |
Source code size: | 264 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 332 / 376 |
Referenced in: | [show references] |