| Modifier and Type | Method and Description |
|---|---|
<V> Try.Value<V> |
Try.ResourceHandler.apply(Throwing.Function<R,V> fn)
Apply the resource and produces an output.
|
<V> Try.Value<V> |
Try.ResourceHandler2.apply(Throwing.Function2<R1,R2,V> fn) |
<V> Try.Value<V> |
Try.ResourceHandler3.apply(Throwing.Function3<R1,R2,R3,V> fn) |
<V> Try.Value<V> |
Try.ResourceHandler4.apply(Throwing.Function4<R1,R2,R3,R4,V> fn) |
static <V> Try.Value<V> |
Try.apply(Throwing.Supplier<? extends V> fn)
Creates a new try from given value provider.
|
static <V> Try.Value<V> |
Try.call(Callable<? extends V> fn)
Creates a new try from given callable.
|
static Try.Value<Throwable> |
Try.failure(Throwable x)
Get a new failure value.
|
<T> Try.Value<T> |
Try.Value.flatMap(Throwing.Function<V,Try.Value<T>> mapper)
Flat map the success value.
|
<T> Try.Value<T> |
Try.Value.map(Throwing.Function<V,T> mapper)
Map the success value.
|
Try.Value<V> |
Try.Value.onComplete(Throwing.Consumer<Throwable> action) |
Try.Value<V> |
Try.Value.onComplete(Throwing.Consumer2<V,Throwable> action)
Always run the given action, works like a finally clause.
|
Try.Value<V> |
Try.Value.onComplete(Throwing.Runnable action)
Always run the given action, works like a finally clause.
|
Try.Value<V> |
Try.Value.onFailure(Consumer<? super Throwable> action)
Run the given action if and only if this is a failure.
|
Try.Value<V> |
Try.Value.onSuccess(Consumer<V> action)
Run the given action if and only if this is a success.
|
Try.Value<V> |
Try.Value.onSuccess(Runnable action)
Run the given action if and only if this is a success.
|
<X extends Throwable> |
Try.Value.recover(Class<X> exception,
Throwing.Function<X,V> fn)
Recover from failure if and only if the exception is a subclass of the given exception filter.
|
<X extends Throwable> |
Try.Value.recover(Class<X> exception,
V value)
Recover from failure if and only if the exception is a subclass of the given exception filter.
|
Try.Value<V> |
Try.Value.recover(Throwing.Function<Throwable,V> fn)
Recover from failure.
|
<X extends Throwable> |
Try.Value.recoverWith(Class<X> exception,
Throwing.Function<X,Try.Value<V>> fn)
Recover from failure if and only if the exception is a subclass of the given exception filter.
|
Try.Value<V> |
Try.Value.recoverWith(Throwing.Function<Throwable,Try.Value<V>> fn)
Recover from failure.
|
static <V> Try.Value<V> |
Try.success(V value)
Get a new success value.
|
<X extends Throwable> |
Try.Value.unwrap(Class<? extends X> type) |
Try.Value<V> |
Try.Value.unwrap(Throwing.Predicate<Throwable> predicate) |
<X extends Throwable> |
Try.Value.wrap(Class<? extends X> predicate,
Throwing.Function<X,Throwable> wrapper) |
Try.Value<V> |
Try.Value.wrap(Throwing.Function<Throwable,Throwable> wrapper) |
<X extends Throwable> |
Try.Value.wrap(Throwing.Predicate<X> predicate,
Throwing.Function<X,Throwable> wrapper) |
| Modifier and Type | Method and Description |
|---|---|
<T> Try.Value<T> |
Try.Value.flatMap(Throwing.Function<V,Try.Value<T>> mapper)
Flat map the success value.
|
<X extends Throwable> |
Try.Value.recoverWith(Class<X> exception,
Throwing.Function<X,Try.Value<V>> fn)
Recover from failure if and only if the exception is a subclass of the given exception filter.
|
Try.Value<V> |
Try.Value.recoverWith(Throwing.Function<Throwable,Try.Value<V>> fn)
Recover from failure.
|
Copyright © 2017. All rights reserved.