sclass NowFuture<T> implements Future<T> { T result; *() {} *(T *result) {} public bool cancel(final boolean b) { false; } public bool isCancelled() { false; } public boolean isDone() { true; } public T get() { ret result; } public T get(long l, TimeUnit timeUnit) { ret result; } }
Adapted from https://stackoverflow.com/questions/13866533/how-to-create-a-completed-future-in-java
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1011894 | 
| Snippet name: | NowFuture (otherwise known as CompletedFuture) | 
| Eternal ID of this version: | #1011894/5 | 
| Text MD5: | 5ec6f5fb33afdc03d9e13ea88b3f2cbd | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-11-10 03:39:20 | 
| Source code size: | 309 bytes / 11 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 680 / 1487 | 
| Version history: | 4 change(s) | 
| Referenced in: | [show references] |