Libraryless. Click here for Pure Java version (77L/1K).
static <A> bool syncClear_trueIfChanged(Collection<A> c) { if (c == null) false; synchronized(collectionMutex(c)) { if (c.isEmpty()) false; c.clear(); true; } }
Began life as a copy of #1016980
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1036362 |
| Snippet name: | syncClear_trueIfChanged - clear & synchronize on collection |
| Eternal ID of this version: | #1036362/1 |
| Text MD5: | d74c52c81ef0aec2f61cc7da0e068eba |
| Transpilation MD5: | d93419a19d69d639fe655292febef75d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-11-26 16:53:09 |
| Source code size: | 185 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 347 / 451 |
| Referenced in: | [show references] |