Code example for FutureTask

0
        this.executor = executor;
    } 
 
 
    public FutureTask<Void> future() {
        future = new FutureTask<Void>( newTask() );
        return future;
    } 
 
    public SafeAsyncTask<ResultT> executor( Executor executor ) {
        this.executor = executor;
        return this;
    } 
 
    public Executor executor() {
        return executor;
    } 
 
    public SafeAsyncTask<ResultT> handler( Handler handler ) {
        this.handler = handler;
        return this;