class TransformAction<V> implements Runnable {

    private final Promise<T> src;
    private final Promise<V> dest;
    private final Function<? super T, V> func;

    private TransformAction(Promise<T> src, Promise<V> dest, Function<? super T, V> func) {
      this.src = src;
      this.dest = dest;
      this.func = func;
    }

    @Override
    public void run() {<FILL_FUNCTION_BODY>}
  }

      try {
        dest.fulfill(func.apply(src.get()));
      } catch (Throwable throwable) {
        dest.fulfillExceptionally((Exception) throwable.getCause());
      }
    
<methods>public boolean cancel(boolean) ,public T get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException,public T get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException,public boolean isCancelled() ,public boolean isDone() <variables>private static final int COMPLETED,private static final int FAILED,private static final Logger LOGGER,private static final int RUNNING,private java.lang.Exception exception,private final non-sealed java.lang.Object lock,private volatile int state,private T value