diff --git a/src/main/java/io/advantageous/reakt/Callback.java b/src/main/java/io/advantageous/reakt/Callback.java index 48c7d67..9f71911 100644 --- a/src/main/java/io/advantageous/reakt/Callback.java +++ b/src/main/java/io/advantageous/reakt/Callback.java @@ -80,6 +80,7 @@ default void reply(final T result) { /** * Resolve resolves a promise. + * * @param result makes it more compatible with ES6 style promises */ default void resolve(final T result) { diff --git a/src/main/java/io/advantageous/reakt/promise/Promise.java b/src/main/java/io/advantageous/reakt/promise/Promise.java index 6169f4c..2ef7629 100644 --- a/src/main/java/io/advantageous/reakt/promise/Promise.java +++ b/src/main/java/io/advantageous/reakt/promise/Promise.java @@ -33,14 +33,13 @@ default Promise freeze() { /** * If a result is sent, and there was no error, then handle the result. - * - * + *

+ *

* There is only one thenHandler. - * + *

* Unlike ES6, {@code then(..)} cannot be chained per se, but {@code whenComplete(..)}, and * {@code }thenMap(...)} can be nested. * - * * @param consumer executed if result has no error. * @return this, fluent API * @throws NullPointerException if result is present and {@code consumer} is @@ -50,12 +49,12 @@ default Promise freeze() { /** * Notified of completeness. - * + *

* If you want N handlers for when the promise gets called back use whenComplete instead of * {@code then} or {@code thenRef}. - * + *

* There can be many {@code whenComplete} handlers. - * + *

* This does not create a new promise. * * @param doneListener doneListener @@ -65,15 +64,14 @@ default Promise freeze() { /** * If a result is sent, and there was no error, then handle the result as a value which could be null. - * + *

* There is only one thenRef handler per promise. - * + *

* Unlike ES6, {@code thenRef(..)} cannot be chained per se as it does not create a new promise, * but {@code whenComplete(..)}, and {@code }thenMap(...)} can be chained. - * + *

* This does not create a new promise. * - * * @param consumer executed if result has no error. * @return this, fluent API * @throws NullPointerException if result is present and {@code consumer} is @@ -86,7 +84,7 @@ default Promise freeze() { * This method can be chained, and it creates a new promise, which can be a different type. * * @param mapper mapper function - * @param new type for new promise + * @param new type for new promise * @return a promise that uses mapper function to map old promise result to new result. */ Promise thenMap(Function mapper);