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

9
LINES

< > BotCompany Repo | #1004755 // keysWithMultipleValuesOnly - filter MultiMap or MultiSetMap

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

Libraryless. Click here for Pure Java version (5489L/30K).

meta-for MultiMap also as MultiSetMap {
  static <A, B> MultiMap<A, B> keysWithMultipleValuesOnly(MultiMap<A, B> mm) {
    new MultiMap<A, B> mm2;
    for (A key : mm.keySet())
      if (l(mm.get(key)) > 1)
        mm2.putAll(key, mm.get(key));
    ret mm2;
  }
}

Author comment

Began life as a copy of #1004753

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004755
Snippet name: keysWithMultipleValuesOnly - filter MultiMap or MultiSetMap
Eternal ID of this version: #1004755/4
Text MD5: cd4fe97b0b2b6448031283d0a329b02a
Transpilation MD5: f941a75d86556d494b24ef1c945db97d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-11 04:23:27
Source code size: 271 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 579 / 624
Version history: 3 change(s)
Referenced in: [show references]