@Test public void fetchingAnAlreadyFulfilledPromiseReturnsTheFulfilledValueImmediately() throws InterruptedException, ExecutionException, TimeoutException { Promise<Integer> promise = new Promise<>(); promise.fulfill(NumberCrunchingTask.CRUNCHED_NUMBER); promise.get(1000, TimeUnit.SECONDS); }
@Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); }
Promise extends PromiseSupport<T> { @Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); } }
Promise extends PromiseSupport<T> { @Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); } Promise(); }
Promise extends PromiseSupport<T> { @Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); } Promise(); @Override void fulfill(T value); @Override void fulfillExceptionally(Exception exception); Promise<T> fulfillInAsync(final Callable<T> task, Executor executor); Promise<Void> thenAccept(Consumer<? super T> action); Promise<T> onError(Consumer<? super Throwable> exceptionHandler); Promise<V> thenApply(Function<? super T, V> func); }
Promise extends PromiseSupport<T> { @Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); } Promise(); @Override void fulfill(T value); @Override void fulfillExceptionally(Exception exception); Promise<T> fulfillInAsync(final Callable<T> task, Executor executor); Promise<Void> thenAccept(Consumer<? super T> action); Promise<T> onError(Consumer<? super Throwable> exceptionHandler); Promise<V> thenApply(Function<? super T, V> func);  }