java.lang.Object
io.hotmoka.exceptions.UncheckSupplier
This class provides a method to transform a supplier with exceptions
into a supplier, by unchecking its exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Supplier<T> uncheck(SupplierWithExceptions<? extends T> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.uncheck(Class<E> exception, SupplierWithExceptions1<? extends T, E> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, SupplierWithExceptions2<? extends T, E1, E2> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, SupplierWithExceptions3<? extends T, E1, E2, E3> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable>
Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, SupplierWithExceptions4<? extends T, E1, E2, E3, E4> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable>
Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, SupplierWithExceptions5<? extends T, E1, E2, E3, E4, E5> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable>
Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, SupplierWithExceptions6<? extends T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable>
Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, Class<E7> exception7, SupplierWithExceptions7<? extends T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions.
-
Method Details
-
uncheck
Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied value- Parameters:
wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E extends Throwable> Supplier<T> uncheck(Class<E> exception, SupplierWithExceptions1<? extends T, E> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE- the type of exceptions that get unchecked- Parameters:
exception- the exception tag ofEwrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable> (Class<E1> exception1, Class<E2> exception2, SupplierWithExceptions2<? extends T, E1, E2> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable, E3 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, SupplierWithExceptions3<? extends T, E1, E2, E3> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get uncheckedE3- the third type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2exception3- the exception tag ofE3wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, SupplierWithExceptions4<? extends T, E1, E2, E3, E4> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get uncheckedE3- the third type of exceptions that get uncheckedE4- the fourth type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2exception3- the exception tag ofE3exception4- the exception tag ofE4wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, SupplierWithExceptions5<? extends T, E1, E2, E3, E4, E5> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get uncheckedE3- the third type of exceptions that get uncheckedE4- the fourth type of exceptions that get uncheckedE5- the fifth type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2exception3- the exception tag ofE3exception4- the exception tag ofE4exception5- the exception tag ofE5wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, SupplierWithExceptions6<? extends T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get uncheckedE3- the third type of exceptions that get uncheckedE4- the fourth type of exceptions that get uncheckedE5- the fifth type of exceptions that get uncheckedE6- the sixth type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2exception3- the exception tag ofE3exception4- the exception tag ofE4exception5- the exception tag ofE5exception6- the exception tag ofE6wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-
uncheck
public static <T,E1 extends Throwable, Supplier<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, Class<E7> exception7, SupplierWithExceptions7<? extends T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into aUncheckedException. They can later be recovered through a method fromCheckRunnableorCheckSupplier.- Type Parameters:
T- the type of the supplied valueE1- the first type of exceptions that get uncheckedE2- the second type of exceptions that get uncheckedE3- the third type of exceptions that get uncheckedE4- the fourth type of exceptions that get uncheckedE5- the fifth type of exceptions that get uncheckedE6- the sixth type of exceptions that get uncheckedE7- the seventh type of exceptions that get unchecked- Parameters:
exception1- the exception tag ofE1exception2- the exception tag ofE2exception3- the exception tag ofE3exception4- the exception tag ofE4exception5- the exception tag ofE5exception6- the exception tag ofE6exception7- the exception tag ofE7wrapped- the supplier with exceptions- Returns:
- the supplier without exceptions
-