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

7
LINES

< > BotCompany Repo | #1013361 // timerAsAutocloseable

JavaX fragment (include)

static AutoCloseable timerAsAutocloseable(final java.util.Timer timer) {
  ret timer == null ? null : new AutoCloseable {
    public void close() {
      timer.cancel();
    }
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013361
Snippet name: timerAsAutocloseable
Eternal ID of this version: #1013361/1
Text MD5: 2c4aa0c1552277b3512ba05fd13cb0ed
Author: stefan
Category: javax / timers
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-03 05:29:23
Source code size: 188 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 490 / 531
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014511 - tempCloseStream - close InputStream after block
#1023119 - flagAsAutoCloseable