public static <T> ContinuableFuture<T> completed(final T result) {
        return new ContinuableFuture<>(new Future<T>() {
            @Override
            public boolean cancel(boolean mayInterruptIfRunning) {
                return false;
            }

            @Override
            public boolean isCancelled() {
                return false;
            }

            @Override
            public boolean isDone() {
                return true;
            }

            @Override
            public T get() {
                return result;
            }

            @Override
            public T get(final long timeout, final TimeUnit unit) {
                return result;
            }
        }, null, DEFAULT_EXECUTOR);
    }
public static < T > ContinuableFuture < T > completed ( final T result ) { return new ContinuableFuture < > ( new Future < T > ( ) { @ Override public boolean cancel ( boolean mayInterruptIfRunning ) { return false ; } @ Override public boolean isCancelled ( ) { return false ; } @ Override public boolean isDone ( ) { return true ; } @ Override public T get ( ) { return result ; } @ Override public T get ( final long timeout , final TimeUnit unit ) { return result ; } } , null , DEFAULT_EXECUTOR ) ; }
@param result
@param asyncExecutor
@return a ContinuableFuture which is already done by passing the result to it directly.