Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1017092 // multiSetTopPairs (highest count first)

JavaX fragment (include)

1  
static <A> L<Pair<A, Int>> multiSetTopPairs(MultiSet<A> ms) {
2  
  new L<Pair<A, Int>> l;
3  
  for (A a : ms.highestFirst())
4  
    l.add(pair(a, ms.get(a)));
5  
  ret l;
6  
}

Author comment

Began life as a copy of #1013507

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017092
Snippet name: multiSetTopPairs (highest count first)
Eternal ID of this version: #1017092/2
Text MD5: 10a552611ce1e639270697fb39c382d0
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-28 17:27:23
Source code size: 165 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 389 / 414
Version history: 1 change(s)
Referenced in: [show references]