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