MCPcopy Create free account
hub / github.com/traneio/future / isDefined

Method isDefined

future-java/src/main/java/io/trane/future/Promise.java:385–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383 }
384
385 @SuppressWarnings("unchecked")
386 @Override
387 public final boolean isDefined() {
388 final Object curr = state;
389 if (curr instanceof SatisfiedFuture) // Done
390 return true;
391 else if (curr instanceof Promise && !(curr instanceof Continuation)) // Linked
392 return ((Promise<T>) curr).isDefined();
393 else if (curr instanceof LinkedContinuation)
394 return ((LinkedContinuation<?, T>) curr).isDefined();
395 else // Waiting
396 return false;
397 }
398
399 @SuppressWarnings("unchecked")
400 @Override

Callers

nothing calls this directly

Calls 1

isDefinedMethod · 0.65

Tested by

no test coverage detected