| Modifier and Type | Class and Description |
|---|---|
static class |
Try.Value<V>
Try with a value.
|
| Modifier and Type | Method and Description |
|---|---|
Try |
Try.onComplete(Throwing.Consumer<Throwable> action)
Always run the given action, works like a finally clause.
|
Try |
Try.onComplete(Throwing.Runnable action)
Always run the given action, works like a finally clause.
|
Try |
Try.onFailure(Consumer<? super Throwable> action)
Run the given action if and only if this is a failure.
|
Try |
Try.onSuccess(Runnable action)
Run the given action if and only if this is a success.
|
Try |
Try.ResourceHandler.run(Throwing.Consumer<R> fn)
Run an operation over the resource.
|
Try |
Try.ResourceHandler2.run(Throwing.Consumer2<R1,R2> fn) |
Try |
Try.ResourceHandler3.run(Throwing.Consumer3<R1,R2,R3> fn) |
Try |
Try.ResourceHandler4.run(Throwing.Consumer4<R1,R2,R3,R4> fn) |
static Try |
Try.run(Throwing.Runnable runnable)
Creates a side effect try from given runnable.
|
<X extends Throwable> |
Try.unwrap(Class<? extends X> type)
In case of failure unwrap the exception provided by calling
Throwable.getCause(). |
Try |
Try.unwrap(Throwing.Predicate<Throwable> predicate)
In case of failure unwrap the exception provided by calling
Throwable.getCause(). |
<X extends Throwable> |
Try.wrap(Class<? extends X> predicate,
Throwing.Function<X,Throwable> wrapper)
In case of failure wrap an exception matching the given predicate to something else.
|
Try |
Try.wrap(Throwing.Function<Throwable,Throwable> wrapper)
In case of failure wrap an exception matching the given predicate to something else.
|
<X extends Throwable> |
Try.wrap(Throwing.Predicate<X> predicate,
Throwing.Function<X,Throwable> wrapper)
In case of failure wrap an exception matching the given predicate to something else.
|
Copyright © 2017. All rights reserved.