Libraryless. Click here for Pure Java version (2501L/16K).
1 | svoid closeAll(Iterable<? extends AutoCloseable> l) { |
2 | if (l == null) ret; |
3 | for (AutoCloseable c : l) pcall { close(c); } |
4 | } |
5 | |
6 | svoid closeAll(AutoCloseable... l) { |
7 | if (l == null) ret; |
8 | for (AutoCloseable c : l) pcall { close(c); } |
9 | } |
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: | 296 / 405 |
Version history: | 1 change(s) |
Referenced in: | [show references] |