| Package | Description |
|---|---|
| de.flapdoodle.guava.monads |
| Modifier and Type | Method and Description |
|---|---|
static <U> TryX<U> |
TryX.failure(RuntimeException e)
Factory method for failure.
|
abstract <U> TryX<U> |
TryX.flatMap(com.google.common.base.Function<? super T,TryX<U>> f)
Transform success or pass on failure, taking a Try as the result.
|
abstract <U> TryX<U> |
TryX.map(com.google.common.base.Function<? super T,? extends U> f)
Transform success or pass on failure.
|
static <U> TryX<U> |
TryX.ofFailable(com.google.common.base.Supplier<U> f) |
abstract <F> TryX<T> |
TryX.onFailure(com.google.common.base.Function<RuntimeException,F> f) |
abstract TryX<T> |
TryX.orElseTry(com.google.common.base.Supplier<T> f)
Return another try in the case of failure.
|
abstract TryX<T> |
TryX.recoverWith(com.google.common.base.Function<? super RuntimeException,TryX<T>> f)
Try applying f(t) on the case of failure.
|
static <U> TryX<U> |
TryX.successful(U x)
Factory method for success.
|
| Modifier and Type | Method and Description |
|---|---|
abstract <U> TryX<U> |
TryX.flatMap(com.google.common.base.Function<? super T,TryX<U>> f)
Transform success or pass on failure, taking a Try as the result.
|
abstract TryX<T> |
TryX.recoverWith(com.google.common.base.Function<? super RuntimeException,TryX<T>> f)
Try applying f(t) on the case of failure.
|
Copyright © 2016. All rights reserved.