public class Ignoring<X extends Exception> extends Object
Use any(Class, Class[]) to get an instance.
| Modifier and Type | Method and Description |
|---|---|
static <X extends Exception> |
any(Class<X> exceptionClass,
Class<? extends RuntimeException>... additional)
Returns a new instance by a given (checked) exceptionClass to be ignored.
|
<R> Optional<R> |
get(XSupplier<R,X> supplier)
Returns the result of running a given
XSupplier ignoring an exception that may occur. |
void |
run(XRunnable<X> runnable)
Runs a given
XRunnable ignoring an exception that may occur. |
@SafeVarargs public static <X extends Exception> Ignoring<X> any(Class<X> exceptionClass, Class<? extends RuntimeException>... additional)
public final void run(XRunnable<X> runnable)
XRunnable ignoring an exception that may occur.any(Class, Class[])public final <R> Optional<R> get(XSupplier<R,X> supplier)
XSupplier ignoring an exception that may occur.R - The result type.any(Class, Class[])Copyright © 2024 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.