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

Method biMap

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

Source from the content-addressed store, hash-verified

567 }
568
569 @Override
570 public <U, R> Future<R> biMap(final Future<U> other, final BiFunction<? super T, ? super U, ? extends R> f) {
571 if (getInterruptHandler() != null)
572 return continuation(new BiMap<T, U, R>(other, f) {
573 @Override
574 protected final InterruptHandler getInterruptHandler() {
575 return InterruptHandler.apply(Promise.this, other);
576 }
577 });
578 else
579 return continuation(new BiMap<T, U, R>(other, f));
580 }
581
582 private static class BiFlatMap<T, U, R> extends Continuation<T, R> {
583 private final BiFunction<? super T, ? super U, ? extends Future<R>> f;

Callers

nothing calls this directly

Calls 2

getInterruptHandlerMethod · 0.95
continuationMethod · 0.95

Tested by

no test coverage detected