MCPcopy Create free account
hub / github.com/antlr/codebuff / set

Method set

output/java_guava/1.4.17/AbstractFuture.java:634–642  ·  view source on GitHub ↗

Sets the result of this Future unless this Future has already been cancelled or set (including plain #setFuture set asynchronously). When a call to this method returns, the Future is guaranteed to be plain #isDone done only if the call was accepted (in wh

(@Nullable V value)

Source from the content-addressed store, hash-verified

632 */
633
634 @CanIgnoreReturnValue
635 protected boolean set(@Nullable V value) {
636 Object valueToSet = value == null ? NULL : value;
637 if (ATOMIC_HELPER.casValue(this, null, valueToSet)) {
638 complete();
639 return true;
640 }
641 return false;
642 }
643
644 /**
645 * Sets the failed result of this {@code Future} unless this {@code Future} has already been

Callers

nothing calls this directly

Calls 2

completeMethod · 0.95
casValueMethod · 0.45

Tested by

no test coverage detected