java.lang.Object
io.hotmoka.exceptions.UncheckConsumer
This class provides a method to transform a consumer with exceptions
into a consumer, by unchecking its exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Consumer<T> uncheck(ConsumerWithExceptions<? super T> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.uncheck(Class<E> exception, ConsumerWithExceptions1<? super T, E> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, ConsumerWithExceptions2<? super T, E1, E2> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, ConsumerWithExceptions3<? super T, E1, E2, E3> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable>
Consumer<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, ConsumerWithExceptions4<? super T, E1, E2, E3, E4> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable>
Consumer<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, ConsumerWithExceptions5<? super T, E1, E2, E3, E4, E5> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable>
Consumer<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, ConsumerWithExceptions6<? super T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a consumer with exceptions into a consumer 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>
Consumer<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, Class<E7> exception7, ConsumerWithExceptions7<? super T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a consumer with exceptions into a consumer without checked exceptions.
-
Method Details
-
uncheck
Transforms a consumer with exceptions into a consumer 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 consumed value- Parameters:
wrapped- the consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E extends Throwable> Consumer<T> uncheck(Class<E> exception, ConsumerWithExceptions1<? super T, E> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed valueE- the type of exceptions that get unchecked- Parameters:
exception- the exception tag ofEwrapped- the consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<T> uncheckE2 extends Throwable> (Class<E1> exception1, Class<E2> exception2, ConsumerWithExceptions2<? super T, E1, E2> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<T> uncheckE2 extends Throwable, E3 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, ConsumerWithExceptions3<? super T, E1, E2, E3> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, ConsumerWithExceptions4<? super T, E1, E2, E3, E4> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<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, ConsumerWithExceptions5<? super T, E1, E2, E3, E4, E5> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<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, ConsumerWithExceptions6<? super T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-
uncheck
public static <T,E1 extends Throwable, Consumer<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, ConsumerWithExceptions7<? super T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a consumer with exceptions into a consumer 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 consumed 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 consumer with exceptions- Returns:
- the consumer without exceptions
-