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

Method map

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

Source from the content-addressed store, hash-verified

18 }
19
20 @Override
21 public final <R> Future<R> map(final Function<? super T, ? extends R> f) {
22 try {
23 return new ValueFuture<>(f.apply(value));
24 } catch (final Throwable ex) {
25 return new ExceptionFuture<>(ex);
26 }
27 }
28
29 @Override
30 public final <R> Future<R> flatMap(final Function<? super T, ? extends Future<R>> f) {

Callers

nothing calls this directly

Calls 1

applyMethod · 0.65

Tested by

no test coverage detected