Whatever message this page gives is out now! Go check it out!
f = runAsync(function() { return 5; });f = f.thenApply(function(x) { return x * 2; });f = f.thenApply(function(x) { return x + 3; });writeOutput(f.get()); // 13| Method | Summary |
|---|---|
| thenApply | Sync map after success. |
| thenAccept | Sync side effect with the value. |
| thenRun | Sync parameterless follow-up. |
| thenCompose | Sync flat-map to another Future. |
| thenCombine | Sync merge of two successful results. |
| thenAcceptBoth | Sync side effect with both values. |
| runAfterBoth | Sync action after both complete. |
| applyToEither | Sync map of the first completing value. |
| acceptEither | Sync consume the first completing value. |
| runAfterEither | Sync action after either completes. |
| whenComplete | Sync observe completion. |
| handle | Sync fold result or error into a new value. |
| exceptionally | Sync recover from failure with a value. |
| exceptionallyCompose | Sync recover from failure with a Future. |