Libraryless. Click here for Pure Java version (2496L/16K).
static <A> void syncClear(Collection<A> c) { if (c != null) synchronized(collectionMutex(c)) { c.clear(); } } svoid syncClear(Map map) { if (map != null) synchronized(collectionMutex(map)) { map.clear(); } }
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: | 481 / 552 |
Version history: | 3 change(s) |
Referenced in: | [show references] |