| Modifier and Type | Method and Description |
|---|---|
default <X extends Throwable> |
Throwing.Supplier.onFailure(Class<X> type,
Consumer<X> action)
Apply this function and run the given action in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.onFailure(Consumer<Throwable> action)
Apply this function and run the given action in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.orElse(Throwing.Supplier<V> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.orElse(V defaultValue)
Apply this function and returns the given default value in case of exception.
|
default <X extends Throwable> |
Throwing.Supplier.recover(Class<? extends X> type,
Function<X,V> fn)
Apply this function or recover from a specific exception in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.recover(Function<Throwable,V> fn)
Apply this function or recover from it in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.singleton()
Singleton version of this supplier.
|
static <V> Throwing.Supplier<V> |
Throwing.throwingSupplier(Throwing.Supplier<V> fn)
Factory method for
Throwing.Supplier. |
default <X extends Throwable> |
Throwing.Supplier.unwrap(Class<? extends X> type)
Apply this function and unwrap any resulting exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.wrap(Function<Throwable,Exception> wrapper)
Apply this function and wrap any resulting exception.
|
| Modifier and Type | Method and Description |
|---|---|
static <V> Try.Value<V> |
Try.apply(Throwing.Supplier<? extends V> fn)
Creates a new try from given value provider.
|
<T extends V> |
When.Value.is(Throwing.Predicate<T> predicate,
Throwing.Supplier<R> result) |
<T extends V,R> |
When.is(Throwing.Predicate<T> predicate,
Throwing.Supplier<R> result) |
When.Value<V,R> |
When.Value.is(V value,
Throwing.Supplier<R> result) |
<R> When.Value<V,R> |
When.is(V value,
Throwing.Supplier<R> result) |
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 Throwing.Function2<V1,V2,R> |
Throwing.Function2.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function3<V1,V2,V3,R> |
Throwing.Function3.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function4<V1,V2,V3,V4,R> |
Throwing.Function4.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function5<V1,V2,V3,V4,V5,R> |
Throwing.Function5.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function6<V1,V2,V3,V4,V5,V6,R> |
Throwing.Function6.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function7<V1,V2,V3,V4,V5,V6,V7,R> |
Throwing.Function7.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Function8<V1,V2,V3,V4,V5,V6,V7,V8,R> |
Throwing.Function8.orElse(Throwing.Supplier<R> defaultValue)
Apply this function and returns the given default value in case of exception.
|
default Throwing.Supplier<V> |
Throwing.Supplier.orElse(Throwing.Supplier<V> defaultValue)
Apply this function and returns the given default value in case of exception.
|
R |
When.Value.orElseGet(Throwing.Supplier<R> value) |
R |
When.Value.orElseThrow(Throwing.Supplier<Throwable> exception) |
static <V> Throwing.Supplier<V> |
Throwing.throwingSupplier(Throwing.Supplier<V> fn)
Factory method for
Throwing.Supplier. |
static <R extends AutoCloseable> |
Try.with(Throwing.Supplier<R> r1)
Functional try-with-resources:
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2)
Functional try-with-resources:
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2)
Functional try-with-resources:
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3)
Functional try-with-resources with 3 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3)
Functional try-with-resources with 3 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3)
Functional try-with-resources with 3 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable,R4 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3,
Throwing.Supplier<R4> r4)
Functional try-with-resources with 4 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable,R4 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3,
Throwing.Supplier<R4> r4)
Functional try-with-resources with 4 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable,R4 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3,
Throwing.Supplier<R4> r4)
Functional try-with-resources with 4 inputs.
|
static <R1 extends AutoCloseable,R2 extends AutoCloseable,R3 extends AutoCloseable,R4 extends AutoCloseable> |
Try.with(Throwing.Supplier<R1> r1,
Throwing.Supplier<R2> r2,
Throwing.Supplier<R3> r3,
Throwing.Supplier<R4> r4)
Functional try-with-resources with 4 inputs.
|
Copyright © 2017. All rights reserved.