| Modifier and Type | Method and Description |
|---|---|
default Throwing.Function<V,R> |
Throwing.Function.memoized()
A function that remember/cache previous executions.
|
default <X extends Throwable> |
Throwing.Function.onFailure(Class<X> type,
Consumer<X> action)
Apply this function and run the given action in case of exception.
|
default Throwing.Function<V,R> |
Throwing.Function.onFailure(Consumer<Throwable> action)
Apply this function and run the given action in case of exception.
|
default Throwing.Function<V,R> |
Throwing.Function.orElse(R defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function<V,R> |
Throwing.Function.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default <X extends Throwable> |
Throwing.Function.recover(Class<? extends X> type,
Function<X,R> fn)
Apply this function or recover from a specific exception in case of exception.
|
default Throwing.Function<V,R> |
Throwing.Function.recover(Function<Throwable,R> fn)
Apply this function or recover from it in case of exception.
|
static <V,R> Throwing.Function<V,R> |
Throwing.throwingFunction(Throwing.Function<V,R> fn)
Factory method for
Throwing.Function and Function. |
default <X extends Throwable> |
Throwing.Function.unwrap(Class<? extends X> type)
Apply this function and unwrap any resulting exception.
|
default Throwing.Function<V,R> |
Throwing.Function.wrap(Function<Throwable,Exception> wrapper)
Apply this function and wrap any resulting exception.
|
| 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.
|
<T> Try.Value<T> |
Try.Value.flatMap(Throwing.Function<V,Try.Value<T>> mapper)
Flat map the success value.
|
<T extends V> |
When.Value.is(Class<T> predicate,
Throwing.Function<T,R> result) |
<T extends V,R> |
When.is(Class<T> predicate,
Throwing.Function<T,R> result) |
<T extends V> |
When.Value.is(Throwing.Predicate<T> predicate,
Throwing.Function<T,R> result) |
<T extends V,R> |
When.is(Throwing.Predicate<T> predicate,
Throwing.Function<T,R> result) |
<V extends AutoCloseable> |
Try.ResourceHandler.map(Throwing.Function<R,V> fn)
Map the resource to a new closeable resource.
|
<T> Try.Value<T> |
Try.Value.map(Throwing.Function<V,T> mapper)
Map the success value.
|
V |
Try.Value.orElseThrow(Throwing.Function<Throwable,Throwable> provider)
Get the success value or throw an exception created by the exception provider.
|
<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.
|
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,R> Throwing.Function<V,R> |
Throwing.throwingFunction(Throwing.Function<V,R> fn)
Factory method for
Throwing.Function and Function. |
<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.
|
<X extends Throwable> |
Try.Value.wrap(Class<? extends X> predicate,
Throwing.Function<X,Throwable> wrapper) |
Try |
Try.wrap(Throwing.Function<Throwable,Throwable> wrapper)
In case of failure wrap an exception matching the given predicate to something else.
|
Try.Value<V> |
Try.Value.wrap(Throwing.Function<Throwable,Throwable> wrapper) |
<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.
|
<X extends Throwable> |
Try.Value.wrap(Throwing.Predicate<X> predicate,
Throwing.Function<X,Throwable> wrapper) |
Copyright © 2017. All rights reserved.