@Test public void testIsDone() { Assert.assertTrue(!slFuture.isDone()); slFuture.setFuture(lfMock); Assert.assertTrue(!slFuture.isDone()); when(lfMock.isDone()).thenReturn(true); Assert.assertTrue(slFuture.isDone()); }
@Override public synchronized boolean isDone() { return future == null ? done || isCancelled() : future.isDone(); }
SettableListenableFuture implements ListenableFuture<T> { @Override public synchronized boolean isDone() { return future == null ? done || isCancelled() : future.isDone(); } }
SettableListenableFuture implements ListenableFuture<T> { @Override public synchronized boolean isDone() { return future == null ? done || isCancelled() : future.isDone(); } SettableListenableFuture(Callable<T> task, ListeningExecutorService executor); }
SettableListenableFuture implements ListenableFuture<T> { @Override public synchronized boolean isDone() { return future == null ? done || isCancelled() : future.isDone(); } SettableListenableFuture(Callable<T> task, ListeningExecutorService executor); @Override synchronized void addListener(Runnable listener, Executor executor); @Override synchronized boolean cancel(boolean b); @Override synchronized boolean isCancelled(); @Override synchronized boolean isDone(); @Override synchronized T get(); @Override synchronized T get(long l, TimeUnit timeUnit); synchronized Callable<T> getTask(); synchronized ListeningExecutorService getExecutor(); synchronized ListenableFuture<T> setFuture(ListenableFuture<T> listenableFuture); }
SettableListenableFuture implements ListenableFuture<T> { @Override public synchronized boolean isDone() { return future == null ? done || isCancelled() : future.isDone(); } SettableListenableFuture(Callable<T> task, ListeningExecutorService executor); @Override synchronized void addListener(Runnable listener, Executor executor); @Override synchronized boolean cancel(boolean b); @Override synchronized boolean isCancelled(); @Override synchronized boolean isDone(); @Override synchronized T get(); @Override synchronized T get(long l, TimeUnit timeUnit); synchronized Callable<T> getTask(); synchronized ListeningExecutorService getExecutor(); synchronized ListenableFuture<T> setFuture(ListenableFuture<T> listenableFuture);  }