| Modifier and Type | Method and Description |
|---|---|
static <A> Try<A> |
Try.doTry(Try.FunctionThrowingException<A> fn)
Create a Try object from a function that could potentially throw an exception and fail.
|
Try<T> |
Try.filter(java.util.function.Predicate<T> predicate)
Apply the predicate to the success value to determine whether this should really be a failure
|
<A> Try<A> |
Try.flatMap(java.util.function.Function<T,Try<A>> fn)
Perform a flatmap over this instance
|
static <A> Try<A> |
Try.fromFailure(Throwable failureVal)
Create a failure instance of Try
|
static <A> Try<A> |
Try.fromSuccess(A successVal)
Create a success instance of Try
|
<A> Try<A> |
Try.map(java.util.function.Function<T,A> fn)
Perform a map over this instance
|
Try<T> |
Try.orElse(Try<T> defaultVal)
Return this instance if it is a success instance.
|
| Modifier and Type | Method and Description |
|---|---|
Try<T> |
Try.orElse(Try<T> defaultVal)
Return this instance if it is a success instance.
|
| Modifier and Type | Method and Description |
|---|---|
<A> Try<A> |
Try.flatMap(java.util.function.Function<T,Try<A>> fn)
Perform a flatmap over this instance
|
Copyright © 2015. All rights reserved.