1 | static <A, B> Comparator<A> mapComparatorDesc(final Map<A, B> map) { |
2 | ret new Comparator<A>() { |
3 | public int compare(A a, A b) { |
4 | ret cmp(map.get(b), map.get(a)); |
5 | } |
6 | }; |
7 | } |
Began life as a copy of #1007530
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007532 |
Snippet name: | mapComparatorDesc - compare by value in map (reversed) |
Eternal ID of this version: | #1007532/1 |
Text MD5: | b23b433d8078f3f7c9ed30ca6990827a |
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:06 |
Source code size: | 189 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 551 / 1195 |
Referenced in: | [show references] |