Libraryless. Click here for Pure Java version (3732L/22K).
1 | static S renderMultiSet(MultiSet ms) { |
2 | if (ms == null) ret "-"; |
3 | new L<S> l; |
4 | for (O o : ms.highestFirst()) |
5 | l.add(str(o) + " (" + ms.get(o) + ")"); |
6 | ret joinWithComma(l); |
7 | } |
8 | |
9 | static <A> S renderMultiSet(Iterable<A> l) { |
10 | ret renderMultiSet(toMultiSet(l)); |
11 | } |
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: | #1010496 |
Snippet name: | renderMultiSet |
Eternal ID of this version: | #1010496/4 |
Text MD5: | e8fc6f6876c1af67b17a2a9a6bd8f6ab |
Transpilation MD5: | d9cafc71426dcc1746361f5b70d22da4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-29 03:38:40 |
Source code size: | 276 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 501 / 566 |
Version history: | 3 change(s) |
Referenced in: | [show references] |