java.lang.Object
io.hotmoka.exceptions.UncheckPredicate
This class provides a method to transform a predicate with exceptions
into a predicate, by unchecking its exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T> uncheck(PredicateWithExceptions<? super T> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.uncheck(Class<E> exception, PredicateWithExceptions1<? super T, E> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, PredicateWithExceptions2<? super T, E1, E2> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, PredicateWithExceptions3<? super T, E1, E2, E3> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable>
Predicate<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, PredicateWithExceptions4<? super T, E1, E2, E3, E4> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable>
Predicate<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, PredicateWithExceptions5<? super T, E1, E2, E3, E4, E5> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.static <T,E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable>
Predicate<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, PredicateWithExceptions6<? super T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a predicate with exceptions into a predicate 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>
Predicate<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, Class<E7> exception7, PredicateWithExceptions7<? super T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a predicate with exceptions into a predicate without checked exceptions.
-
Method Details
-
uncheck
Transforms a predicate with exceptions into a predicate 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 tested value- Parameters:
wrapped- the predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E extends Throwable> Predicate<T> uncheck(Class<E> exception, PredicateWithExceptions1<? super T, E> wrapped) Transforms a predicate with exceptions into a predicate 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 tested valueE- the type of exceptions that get unchecked- Parameters:
exception- the exception tag ofEwrapped- the predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<T> uncheckE2 extends Throwable> (Class<E1> exception1, Class<E2> exception2, PredicateWithExceptions2<? super T, E1, E2> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<T> uncheckE2 extends Throwable, E3 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, PredicateWithExceptions3<? super T, E1, E2, E3> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<T> uncheckE2 extends Throwable, E3 extends Throwable, E4 extends Throwable> (Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, PredicateWithExceptions4<? super T, E1, E2, E3, E4> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<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, PredicateWithExceptions5<? super T, E1, E2, E3, E4, E5> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<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, PredicateWithExceptions6<? super T, E1, E2, E3, E4, E5, E6> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-
uncheck
public static <T,E1 extends Throwable, Predicate<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, PredicateWithExceptions7<? super T, E1, E2, E3, E4, E5, E6, E7> wrapped) Transforms a predicate with exceptions into a predicate 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 tested 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 predicate with exceptions- Returns:
- the predicate without exceptions
-