Libraryless. Click here for Pure Java version (2496L/16K).
1 | static <A> void syncClear(Collection<A> c) { |
2 | if (c != null) synchronized(collectionMutex(c)) { c.clear(); } |
3 | } |
4 | |
5 | svoid syncClear(Map map) { |
6 | if (map != null) synchronized(collectionMutex(map)) { map.clear(); } |
7 | } |
Began life as a copy of #1016979
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: | #1016980 |
Snippet name: | syncClear - clear & synchronize on collection |
Eternal ID of this version: | #1016980/4 |
Text MD5: | 6a0a028e55b66f7230eb152d22087858 |
Transpilation MD5: | 349571e8ae45f2a13e55d12b53908ba4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-09-11 15:47:53 |
Source code size: | 218 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 482 / 555 |
Version history: | 3 change(s) |
Referenced in: | [show references] |