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

14
LINES

< > BotCompany Repo | #1031459 // test_MultiSetMapWithTopTen (OK)

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

Libraryless. Click here for Pure Java version (3414L/20K).

svoid test_MultiSetMapWithTopTen() {
  new MultiSetMapWithTopTen mm;
  mm.put("a", "b");
  mm.put("a", "c");
  mm.put("b", "e");
  mm.put("b", "f");
  mm.put("b", "g");
  mm.put("c", "x");
  assertEqualsVerbose(ll("b", "a", "c"), asList(mm.keysByPopularityIterator()));
  mm.remove("b", "f");
  assertEqualsVerbose(ll("a", "b", "c"), asList(mm.keysByPopularityIterator()));
  mm.remove("b", "g");
  assertEqualsVerbose(ll("a", "c", "b"), asList(mm.keysByPopularityIterator()));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031459
Snippet name: test_MultiSetMapWithTopTen (OK)
Eternal ID of this version: #1031459/5
Text MD5: 0d45b783744576f4eac8341004e8addf
Transpilation MD5: 4f09c65c96e9babd5b2869da3098e8b1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-14 01:11:17
Source code size: 492 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 83 / 144
Version history: 4 change(s)
Referenced in: [show references]