@Test public void notCompleted() { Promise<String> promise = Promise.make(); assertFalse(promise.isCompleted()); }
@Override public boolean isCompleted() { synchronized (state) { return state.completed; } }
PromiseImpl implements SealedPromise<T> { @Override public boolean isCompleted() { synchronized (state) { return state.completed; } } }
PromiseImpl implements SealedPromise<T> { @Override public boolean isCompleted() { synchronized (state) { return state.completed; } } PromiseImpl(Executor executor); }
PromiseImpl implements SealedPromise<T> { @Override public boolean isCompleted() { synchronized (state) { return state.completed; } } PromiseImpl(Executor executor); @Override boolean tryComplete(Try<? extends T> value); @Override Try<T> get(); @Override Try<T> get(Duration timeout); @Override boolean isCompleted(); @Override Promise<T> onComplete(Consumer1<? super Try<? extends T>> consumer); @Override Promise<R> map(Function1<? super T, ? extends R> mapper); }
PromiseImpl implements SealedPromise<T> { @Override public boolean isCompleted() { synchronized (state) { return state.completed; } } PromiseImpl(Executor executor); @Override boolean tryComplete(Try<? extends T> value); @Override Try<T> get(); @Override Try<T> get(Duration timeout); @Override boolean isCompleted(); @Override Promise<T> onComplete(Consumer1<? super Try<? extends T>> consumer); @Override Promise<R> map(Function1<? super T, ? extends R> mapper);  }