Libraryless. Click here for Pure Java version (9157L/50K).
svoid closeAllOpt(Iterable l) { if (l == null) ret; for (O c : l) pcall { if (c cast AutoCloseable) close(c); } } svoid closeAllOpt(O... l) { if (l == null) ret; for (O c : l) pcall { if (c cast AutoCloseable) close(c); } }
Began life as a copy of #1026437
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035777 | 
| Snippet name: | closeAllOpt | 
| Eternal ID of this version: | #1035777/7 | 
| Text MD5: | 6838d181991a4491d2d2d39b50a865f4 | 
| Transpilation MD5: | 4264f0cdcb6ebcde793ae4b8e9a896a4 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2022-07-23 23:05:51 | 
| Source code size: | 250 bytes / 11 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 367 / 486 | 
| Version history: | 6 change(s) | 
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |