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