Code example for FutureTask

Methods: isCancelled

0
    public boolean cancel(boolean mayInterruptIfRunning) {
        return fInternalFT.cancel(mayInterruptIfRunning);
    } 
 
    public boolean isCancelled() { 
        return fInternalFT.isCancelled();
    } 
 
    public boolean isDone() { 
        return fInternalFT.isDone();
    } 
 
    public V get() throws InterruptedException, ExecutionException { 
        invoke(); 
        return fInternalFT.get();
    } 
 
    public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
        invoke(); 
        return fInternalFT.get(timeout, unit);
    }