Libraryless. Click here for Pure Java version (2501L/16K).
svoid closeAll(Iterable<? extends AutoCloseable> l) { if (l == null) ret; for (AutoCloseable c : l) pcall { close(c); } } svoid closeAll(AutoCloseable... l) { if (l == null) ret; for (AutoCloseable c : l) pcall { close(c); } }
Began life as a copy of #1026413
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026437 |
Snippet name: | closeAll |
Eternal ID of this version: | #1026437/2 |
Text MD5: | f9403340715772e97cae99e527134391 |
Transpilation MD5: | 9faf9464a2a0208ec935e26a4a16531f |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-09-16 13:43:55 |
Source code size: | 243 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 295 / 403 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1026728 - closeAll_cloneList #1035777 - closeAllOpt |