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

4
LINES

< > BotCompany Repo | #1028175 // multiSetDuplicatesByPopularity - only elements with count > 1

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3078L/19K).

static <A> L<A> multiSetDuplicatesByPopularity(MultiSet<A> ms) {
  if (ms == null) null;
  ret sortedByComparator(multiSetComparatorDesc(ms), filter(keys(ms), a -> ms.get(a) > 1));
}

Author comment

Began life as a copy of #1011986

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: #1028175
Snippet name: multiSetDuplicatesByPopularity - only elements with count > 1
Eternal ID of this version: #1028175/3
Text MD5: 504267e9cafe2107d2b574501eb53c02
Transpilation MD5: 58f4c63c160f9706c73806987441a152
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:44:18
Source code size: 185 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 280
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1028181 - msNumberOfDuplicates - count elements with count > 1
#1028770 - multiSetDuplicates - in original order