| Package | Description |
|---|---|
| org.smallibs.concurrent.execution | |
| org.smallibs.concurrent.promise | |
| org.smallibs.concurrent.promise.impl | |
| org.smallibs.data | |
| org.smallibs.util |
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
ExecutorHelper.await(Promise<T> promise)
Await method
|
static <T> Try<T> |
ExecutorHelper.await(Promise<T> promise,
long duration,
TimeUnit timeUnit)
Await method for a given duration
|
| Modifier and Type | Method and Description |
|---|---|
void |
Promise.onComplete(java.util.function.Consumer<Try<T>> consumer)
Callback called when the computation terminates
|
| Modifier and Type | Method and Description |
|---|---|
void |
PassivePromise.response(Try<T> response) |
| Modifier and Type | Method and Description |
|---|---|
void |
SolvedPromise.onComplete(java.util.function.Consumer<Try<T>> consumer) |
void |
PassivePromise.onComplete(java.util.function.Consumer<Try<T>> consumer) |
| Constructor and Description |
|---|
SolvedPromise(Try<T> value) |
| Modifier and Type | Class and Description |
|---|---|
static class |
Try.Failure<T>
Failure implementation
|
static class |
Try.Success<T>
Success implementation
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
Try.failure(Throwable value) |
default Try<T> |
Try.filter(java.util.function.Predicate<? super T> predicate) |
<B> Try<B> |
Try.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Success.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Failure.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
default <B> Try<B> |
Try.map(java.util.function.Function<? super T,B> mapper) |
Try<T> |
Try.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.Success.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.Failure.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
Try<T> |
Try.Success.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
Try<T> |
Try.Failure.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
default Try<T> |
Try.self() |
static <T> Try<T> |
Try.success(T value) |
static <T> Try<T> |
MaybeHelper.toTry(Maybe<T> maybe) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
static <T> Maybe<T> |
TryHelper.toMaybe(Try<T> aTry) |
| Modifier and Type | Method and Description |
|---|---|
default <R> R |
Try.accept(java.util.function.Function<HK<Try,T,Try<T>>,R> f) |
default <R> R |
Try.accept(java.util.function.Function<HK<Try,T,Try<T>>,R> f) |
<B> Try<B> |
Try.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Success.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Failure.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
| Modifier and Type | Method and Description |
|---|---|
static <T,R> java.util.function.Function<T,Try<R>> |
FunctionsWithError.toFunction(FunctionWithError<T,R> function) |
Copyright © 2017. All rights reserved.