Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1036601 // CloseableWrapper - wraps an object + user-defined close function

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (55L/1K).

persistable sclass CloseableWrapper<A> is IAutoCloseableF0<A> {
  A object;
  
  *(A *object) {}
  *(A *object, Runnable *close) {}
  
  public A get() { ret object; }
  
  public swappable void close() {}
}

Author comment

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: 150 / 221
Version history: 3 change(s)
Referenced in: #1003674 - Standard Classes + Interfaces (LIVE continued in #1034167)