Class SolvedPromise<T>
java.lang.Object
org.smallibs.concurrent.promise.impl.SolvablePromise<T>
org.smallibs.concurrent.promise.impl.SolvedPromise<T>
-
Field Summary
Fields inherited from interface org.smallibs.concurrent.promise.Promise
MAX_AWAIT_DURATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <R> Promise<R> biMap(FunctionWithError<? super T, ? extends R> onSuccess, FunctionWithError<? super Throwable, ? extends R> onError) Method used to map a function on success and another one on error.Method called when the current data must be filtered using a given predicate.final <R> Promise<R> Method used to flatmap a function.final <R> Promise<R> map(FunctionWithError<? super T, ? extends R> function) Method used to map a function.self()Methods inherited from class org.smallibs.concurrent.promise.impl.SolvablePromise
await, await, createFuture, getFuture, onComplete, onFailure, onSuccess, solve
-
Constructor Details
-
SolvedPromise
-
-
Method Details
-
map
Description copied from interface:PromiseMethod used to map a function. This mapping is done when the operation is a success. The result of this mapping is a new promise component. -
biMap
public final <R> Promise<R> biMap(FunctionWithError<? super T, ? extends R> onSuccess, FunctionWithError<? super Throwable, ? extends R> onError) Description copied from interface:PromiseMethod used to map a function on success and another one on error. The result of this mapping is a new promise component. -
flatmap
Description copied from interface:PromiseMethod used to flatmap a function. This mapping is done when the operation is a success. The result of this mapping is a new promise component. -
filter
Description copied from interface:FilterMethod called when the current data must be filtered using a given predicate. -
self
-