public final class Converter extends Object
XFunction)
to more common ones (e.g. Function) that, when executed, will wrap any occurring checked exception in a
specific unchecked exception. Any unchecked exception that may occur will remain unaffected.Conversion| Modifier and Type | Method and Description |
|---|---|
<T,U> BiConsumer<T,U> |
biConsumer(XBiConsumer<T,U,?> xBiConsumer)
Converts an
XBiConsumer that may throw a checked exception to a BiConsumer that,
when executed, wraps any occurring checked exception in a specific unchecked exception. |
<T,U,R> BiFunction<T,U,R> |
biFunction(XBiFunction<T,U,R,?> xBiFunction)
Converts an
XBiFunction that may throw a checked exception to a BiFunction that,
when executed, wraps any occurring checked exception in a specific unchecked exception. |
<T,U> BiPredicate<T,U> |
biPredicate(XBiPredicate<T,U,?> xBiPredicate)
Converts an
XBiPredicate that may throw a checked exception to a BiPredicate that,
when executed, wraps any occurring checked exception in a specific unchecked exception. |
<T> Consumer<T> |
consumer(XConsumer<T,?> xConsumer)
|
<T,R> Function<T,R> |
function(XFunction<T,R,?> xFunction)
|
<T> Predicate<T> |
predicate(XPredicate<T,?> xPredicate)
Converts an
XPredicate that may throw a checked exception to a Predicate that,
when executed, wraps any occurring checked exception in a specific unchecked exception. |
Runnable |
runnable(XRunnable<?> xRunnable)
|
<R> Supplier<R> |
supplier(XSupplier<R,?> xSupplier)
|
static Converter |
using(Function<Throwable,? extends RuntimeException> wrapping)
Returns a new instance using a given wrapping method.
|
public static Converter using(Function<Throwable,? extends RuntimeException> wrapping)
public final Runnable runnable(XRunnable<?> xRunnable)
XRunnable that may throw a checked exception to a Runnable that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T> Consumer<T> consumer(XConsumer<T,?> xConsumer)
XConsumer that may throw a checked exception to a Consumer that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T,U> BiConsumer<T,U> biConsumer(XBiConsumer<T,U,?> xBiConsumer)
XBiConsumer that may throw a checked exception to a BiConsumer that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <R> Supplier<R> supplier(XSupplier<R,?> xSupplier)
XSupplier that may throw a checked exception to a Supplier that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T> Predicate<T> predicate(XPredicate<T,?> xPredicate)
XPredicate that may throw a checked exception to a Predicate that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T,U> BiPredicate<T,U> biPredicate(XBiPredicate<T,U,?> xBiPredicate)
XBiPredicate that may throw a checked exception to a BiPredicate that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T,R> Function<T,R> function(XFunction<T,R,?> xFunction)
XFunction that may throw a checked exception to a Function that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)public final <T,U,R> BiFunction<T,U,R> biFunction(XBiFunction<T,U,R,?> xBiFunction)
XBiFunction that may throw a checked exception to a BiFunction that,
when executed, wraps any occurring checked exception in a specific unchecked exception.using(Function)Copyright © 2021 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.