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

Method biFlatMap

future-java/src/main/java/io/trane/future/Promise.java:597–609  ·  view source on GitHub ↗
(final Future<U> other,
      final BiFunction<? super T, ? super U, ? extends Future<R>> f)

Source from the content-addressed store, hash-verified

595 }
596
597 @Override
598 public <U, R> Future<R> biFlatMap(final Future<U> other,
599 final BiFunction<? super T, ? super U, ? extends Future<R>> f) {
600 if (getInterruptHandler() != null)
601 return continuation(new BiFlatMap<T, U, R>(other, f) {
602 @Override
603 protected final InterruptHandler getInterruptHandler() {
604 return InterruptHandler.apply(Promise.this, other);
605 }
606 });
607 else
608 return continuation(new BiFlatMap<T, U, R>(other, f));
609 }
610
611 private static class Ensure<T> extends Continuation<T, T> {
612 private final Runnable f;

Callers

nothing calls this directly

Calls 2

getInterruptHandlerMethod · 0.95
continuationMethod · 0.95

Tested by

no test coverage detected