1 | sclass NowFuture<T> implements Future<T> { |
2 | T result; |
3 | *() {} |
4 | *(T *result) {} |
5 | |
6 | public bool cancel(final boolean b) { false; } |
7 | public bool isCancelled() { false; } |
8 | public boolean isDone() { true; } |
9 | public T get() { ret result; } |
10 | public T get(long l, TimeUnit timeUnit) { ret result; } |
11 | } |
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: | 474 / 1267 |
Version history: | 4 change(s) |
Referenced in: | [show references] |