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