Package de.treestack.throwing
Interface BiPredicate<T1,T2,E extends Exception>
- Type Parameters:
T1- the type of the first input to the predicateT2- the type of the second input to the predicateE- the type of the exception that may be thrown
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a predicate (boolean-valued function) of two arguments that might throw an exception.
This is the two-arity specialization of
Predicate.
This is a functional interface
whose functional method is test(Object, Object).
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluates this predicate on the given argument.default BiPredicate<T1, T2> Wraps this function that may throw an exception into a function that will throw a RuntimeException if the original function throws an exception.static <T1,T2> BiPredicate <T1, T2> unchecked(BiPredicate<? super T1, ? super T2, ?> function) Wraps a function that may throw an exception into a function that will throw a RuntimeException if the original function throws an exception.
-
Method Details
-
test
Evaluates this predicate on the given argument.- Parameters:
t- the first input argumentt2- the second input argument- Returns:
trueif the input arguments match the predicate,- Throws:
E- if an exception occurs otherwisefalse
-
unchecked
Wraps a function that may throw an exception into a function that will throw a RuntimeException if the original function throws an exception.- Type Parameters:
T1- the type of the input to the functionT2- the type of the input to the function- Parameters:
function- the function to wrap- Returns:
- a function that will throw a RuntimeException if the original function throws an exception
- Since:
- 1.0
-
unchecked
Wraps this function that may throw an exception into a function that will throw a RuntimeException if the original function throws an exception.- Returns:
- a function that will throw a RuntimeException if the original function throws an exception
- Since:
- 1.0
- See Also:
-