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

Method map

future-java/src/main/java/io/trane/future/Promise.java:463–474  ·  view source on GitHub ↗
(final Function<? super T, ? extends R> f)

Source from the content-addressed store, hash-verified

461 }
462
463 @Override
464 public final <R> Future<R> map(final Function<? super T, ? extends R> f) {
465 if (getInterruptHandler() != null)
466 return continuation(new Map<T, R>(f) {
467 @Override
468 protected final InterruptHandler getInterruptHandler() {
469 return Promise.this;
470 }
471 });
472 else
473 return continuation(new Map<T, R>(f));
474 }
475
476 private static class FlatMap<T, R> extends Continuation<T, R> {
477 private final Function<? super T, ? extends Future<R>> f;

Callers 1

mapPromiseMethod · 0.95

Calls 2

getInterruptHandlerMethod · 0.95
continuationMethod · 0.95

Tested by

no test coverage detected