Libraryless. Click here for Pure Java version (55L/1K).
1 | persistable sclass CloseableWrapper<A> is IAutoCloseableF0<A> {
|
2 | A object; |
3 | |
4 | *(A *object) {}
|
5 | *(A *object, Runnable *close) {}
|
6 | |
7 | public A get() { ret object; }
|
8 | |
9 | public swappable void close() {}
|
10 | } |
Began life as a copy of #1036129
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1036601 |
| Snippet name: | CloseableWrapper - wraps an object + user-defined close function |
| Eternal ID of this version: | #1036601/4 |
| Text MD5: | 75c30b44046a7ee90cbcead39f7138fd |
| Transpilation MD5: | 6bbc6fb8b048843c4d529f8ebc8ea3b8 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-04-17 20:31:03 |
| Source code size: | 216 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 700 / 886 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |