1 | static <A> Map<A, Int> msTopTenMap(MultiSet<A> ms, int n) { |
2 | new LinkedHashMap<A, Int> map; |
3 | if (ms != null) |
4 | for (A a : ms.getTopTen(n)) |
5 | map.put(a, ms.get(a)); |
6 | ret map; |
7 | } |
8 | |
9 | static <A> Map<A, Int> msTopTenMap(MultiSet<A> ms) { |
10 | ret msTopTenMap(ms, 10); |
11 | } |
Began life as a copy of #1012470
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012471 |
Snippet name: | msTopTenMap |
Eternal ID of this version: | #1012471/1 |
Text MD5: | 0642ddb2a42671ac34fedb61499ec574 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-03 21:54:08 |
Source code size: | 277 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 421 / 476 |
Referenced in: | [show references] |