Creates a {@code FutureTask} that will, upon running, execute the
given {@code Runnable}, and arrange that {@code get} will return the
given result on successful completion.
@param runnable the runnable task
@param result the result to return on successful completion. If
you don't need a particular result, consider using
constructions of the form:
{@code Future<?> f = new FutureTask!(void)(runnable, null)}
@throws NullPointerException if the runnable is null
Creates a {@code FutureTask} that will, upon running, execute the given {@code Runnable}, and arrange that {@code get} will return the given result on successful completion.
@param runnable the runnable task @param result the result to return on successful completion. If you don't need a particular result, consider using constructions of the form: {@code Future<?> f = new FutureTask!(void)(runnable, null)} @throws NullPointerException if the runnable is null