Interface Promise<T>
- All Superinterfaces:
Applicable<Promise<?>,,T> Bindable<Promise<?>,,T> Kind<Promise<?>,,T> Mappable<Promise<?>,,T> PromiseOf<T>
- All Known Implementing Classes:
PromiseImpl
public sealed interface Promise<T>
extends PromiseOf<T>, Bindable<Promise<?>,T>, Applicable<Promise<?>,T>
permits PromiseImpl<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.core.Applicable
Applicable.Map2<F extends Applicable<F,?>, A, B>, Applicable.Map3<F extends Applicable<F, ?>, A, B, C>, Applicable.Map4<F extends Applicable<F, ?>, A, B, C, D>, Applicable.Map5<F extends Applicable<F, ?>, A, B, C, D, E> -
Method Summary
Modifier and TypeMethodDescriptiondefault <R> Promise<R> <R> Promise<R> await()cancel()<R> Promise<R> static <T> Promise<T> from(CompletableFuture<? extends T> future) static <T> Promise<T> from(Executor executor, CompletableFuture<? extends T> future) booleanstatic <T> Promise<T> make()static <T> Promise<T> <R> Promise<R> static <A,B, C, D, E, R>
Promise<R> mapN(Promise<? extends A> fa, Promise<? extends B> fb, Promise<? extends C> fc, Promise<? extends D> fd, Promise<? extends E> fe, Function5<? super A, ? super B, ? super C, ? super D, ? super E, ? extends R> mapper) static <A,B, C, D, E>
Promise<E> mapN(Promise<? extends A> fa, Promise<? extends B> fb, Promise<? extends C> fc, Promise<? extends D> fd, Function4<? super A, ? super B, ? super C, ? super D, ? extends E> mapper) static <A,B, C, D>
Promise<D> mapN(Promise<? extends A> fa, Promise<? extends B> fb, Promise<? extends C> fc, Function3<? super A, ? super B, ? super C, ? extends D> mapper) static <A,B, C> Promise <C> mapN(Promise<? extends A> fa, Promise<? extends B> fb, Function2<? super A, ? super B, ? extends C> mapper) onComplete(Consumer1<? super Try<? extends T>> consumer) thenRun(CheckedRunnable next) booleantryComplete(Try<? extends T> value) Methods inherited from interface com.github.tonivade.purefun.core.Applicable
zip, zipLeft, zipRight, zipWith
-
Method Details
-
tryComplete
-
cancel
-
complete
-
succeeded
-
failed
-
onComplete
-
onSuccess
-
onFailure
-
map
-
ap
- Specified by:
apin interfaceApplicable<Promise<?>,T>
-
andThen
-
flatMap
-
then
-
thenRun
-
await
-
await
-
isCompleted
boolean isCompleted() -
make
-
make
-
from
-
from
-
mapN
-
mapN
-
mapN
-
mapN
-