static <A, B> Comparator<A> mapComparator(final Map<A, B> map) { ret new Comparator<A>() { public int compare(A a, A b) { ret cmp(map.get(a), map.get(b)); } }; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
Snippet ID: | #1007530 |
Snippet name: | mapComparator - compare by value in map |
Eternal ID of this version: | #1007530/5 |
Text MD5: | 4df33075a9ddd42d2b8ab1182b8eda8a |
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:58:56 |
Source code size: | 185 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 617 / 657 |
Version history: | 4 change(s) |
Referenced in: | [show references] |