Libraryless. Click here for Pure Java version (2993L/18K).
1 | static <A> Comparator<A> multiSetComparatorDesc(MultiSet<A> ms) { |
2 | ret ms == null ? null : new Comparator<A>() { |
3 | public int compare(A a, A b) { |
4 | return cmp(ms.get(b), ms.get(a)); |
5 | } |
6 | }; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028174 |
Snippet name: | multiSetComparatorDesc - highest count first |
Eternal ID of this version: | #1028174/2 |
Text MD5: | f18e8ac7094507be4feffb4b340ab3ff |
Transpilation MD5: | ecbaa0e9116b5ae1f28fb903d1f863ec |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-05-25 13:43:51 |
Source code size: | 207 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 159 / 237 |
Version history: | 1 change(s) |
Referenced in: | [show references] |