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


< > TinyBrain | #1013620 - Test collectionMutex (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (6469L/43K).


set flag collectionMutex_debug.

p {
  L l = ll();
  assertSame("ArrayList", collectionMutex(l), l);
  new HashMap hmap;
  assertSame("HashMap", collectionMutex(keySet(hmap)), hmap);
  NavigableMap map = caseInsensitiveMap();
  assertSameVerbose("keySet/caseInsensitiveMap", collectionMutex(keySet(map)), map);
  assertSameVerbose("navigableKeys/caseInsensitiveMap", collectionMutex(navigableKeys(map)), map);
  map.put("bla", "");
  assertSameVerbose("prefixSubSet/navigableKeys/caseInsensitiveMap", collectionMutex(printClassName(prefixSubSet(navigableKeys(map), "bla"))), map);
  new WeakHashSet whs;

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1013620
Snippet name: Test collectionMutex (OK)
Eternal ID of this version: #1013620/21
Text MD5: f12d0a3b32ed7df4993943009ab58393
Transpilation MD5: 4cfed6e2c0acfedaf74a6a67e4a1f96c
Author: stefan
Category: javax / collections
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-12 11:13:50
Source code size: 737 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 87 / 368
Version history: 20 change(s)
Referenced in: [show]