/** * Subclasses should invoke this method to set the result of the computation * to {@code value}. This will set the state of the future to * {@link BaseFuture.Sync#COMPLETED} and call {@link #done()} if the * state was successfully changed. * * @param value the value that was the result of the task. * @return true if the state was successfully changed. */ protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { done(); } return result; }
/** * Subclasses should invoke this method to set the result of the computation * to {@code value}. This will set the state of the future to * {@link BaseFuture.Sync#COMPLETED} and call {@link #done()} if the * state was successfully changed. * * @param value the value that was the result of the task. * @return true if the state was successfully changed. */ protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { done(); } return result; }
/** * Subclasses should invoke this method to set the result of the computation * to {@code value}. This will set the state of the future to * {@link BaseFuture.Sync#COMPLETED} and call {@link #done()} if the * state was successfully changed. * * @param value the value that was the result of the task. * @return true if the state was successfully changed. */ protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { done(); } return result; }
/** * Subclasses should invoke this method to set the result of the computation * to {@code value}. This will set the state of the future to * {@link BaseFuture.Sync#COMPLETED} and call {@link #done()} if the * state was successfully changed. * * @param value the value that was the result of the task. * @return true if the state was successfully changed. */ protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { done(); } return result; }
/** * Subclasses should invoke this method to set the result of the computation * to {@code value}. This will set the state of the future to * {@link BaseFuture.Sync#COMPLETED} and call {@link #done()} if the * state was successfully changed. * * @param value the value that was the result of the task. * @return true if the state was successfully changed. */ protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { done(); } return result; }