ifndef NoAWT static void cancelTimer(javax.swing.Timer timer) { if (timer != null) timer.stop(); } endifndef static void cancelTimer(java.util.Timer timer) { if (timer != null) timer.cancel(); } static void cancelTimer(O o) { if (o instanceof java.util.Timer) cancelTimer((java.util.Timer) o); ifndef NoAWT else if (o instanceof javax.swing.Timer) cancelTimer((javax.swing.Timer) o); endifndef else if (o instanceof AutoCloseable) pcall { ((AutoCloseable) o).close(); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1009857 |
| Snippet name: | cancelTimer - cancel javax.swing.Timer or java.util.Timer - also takes AutoCloseable |
| Eternal ID of this version: | #1009857/8 |
| Text MD5: | 0ab7e43067c2d7f516804da87e99bdd9 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-02-15 13:29:02 |
| Source code size: | 503 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1018 / 1239 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |