public void resolve(T valueToResolve) {
    if (myTargetPromise.isDone()) {
      throw new IllegalStateException("Target value is already resolved to '" + myTargetPromise.get() + "'");
    }
    myTargetPromise.setResult(valueToResolve);
  }
public void resolve(T valueToResolve)