Libraryless. Click here for Pure Java version (2515L/16K).
1 | static <A> L<A> syncCloneAndClearList(Cl<A> l) { |
2 | if (l == null) ret emptyList(); |
3 | synchronized(collectionMutex(l)) { |
4 | L<A> l2 = cloneList(l); |
5 | l.clear(); |
6 | ret l2; |
7 | } |
8 | } |
Began life as a copy of #1009575
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030047 |
Snippet name: | syncCloneAndClearList |
Eternal ID of this version: | #1030047/2 |
Text MD5: | 03baa3224f18904b37267e7acede1f47 |
Transpilation MD5: | 9b8e54fecf3cc1176549055a4d89aca3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-11-02 23:02:16 |
Source code size: | 187 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 209 / 301 |
Version history: | 1 change(s) |
Referenced in: | [show references] |