public final class RunnablePromise<T> extends PassivePromise<T> implements RunnableFuture<T>
| Constructor and Description |
|---|
RunnablePromise(Callable<T> callable) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(java.util.function.Function<HK<Promise,T,Promise<T>>,R> f) |
boolean |
cancel(boolean mayInterruptIfRunning) |
HK<Promise,T,Promise<T>> |
filter(java.util.function.Predicate<? super T> predicate)
Method called when the current data must be filtered using a given predicate.
|
<R> Promise<R> |
flatmap(java.util.function.Function<? super T,Promise<R>> function)
Method use to flatmap a function.
|
<R> Promise<R> |
map(FunctionWithError<? super T,R> function)
Method use to map a function.
|
void |
run() |
Promise<T> |
self() |
get, get, getFuture, isCancelled, isDone, onComplete, onFailure, onSuccess, responseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, isCancelled, isDonepublic boolean cancel(boolean mayInterruptIfRunning)
public void run()
run in interface Runnablerun in interface RunnableFuture<T>public <R> R accept(java.util.function.Function<HK<Promise,T,Promise<T>>,R> f)
public final <R> Promise<R> map(FunctionWithError<? super T,R> function)
Promisepublic final <R> Promise<R> flatmap(java.util.function.Function<? super T,Promise<R>> function)
Promisepublic HK<Promise,T,Promise<T>> filter(java.util.function.Predicate<? super T> predicate)
FilterCopyright © 2017. All rights reserved.