Package com.pivovarit.function
Interface ThrowingBiPredicate<T,U,E extends Exception>
- Type Parameters:
T
- the type of the first argument to the predicateU
- the type of the second argument to the predicateE
- the type of the thrown checked exception
- 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. This is
the two-arity specialization of
ThrowingPredicate
.
Function may throw a checked exception.-
Method Summary
Modifier and TypeMethodDescriptiondefault ThrowingBiPredicate
<T, U, E> and
(ThrowingBiPredicate<? super T, ? super U, ? extends E> other) default ThrowingBiFunction
<T, U, Boolean, E> default ThrowingBiPredicate
<T, U, E> negate()
default ThrowingBiPredicate
<T, U, E> or
(ThrowingBiPredicate<? super T, ? super U, ? extends E> other) static <T,
U> BiPredicate <T, U> sneaky
(ThrowingBiPredicate<T, U, ?> predicate) boolean
default BiPredicate
<T, U> uncheck()
static <T,
U> BiPredicate <T, U> unchecked
(ThrowingBiPredicate<T, U, ?> predicate) default ThrowingBiPredicate
<T, U, E> xor
(ThrowingBiPredicate<? super T, ? super U, ? extends E> other)
-
Method Details
-
test
- Throws:
E
-
unchecked
-
sneaky
- Returns:
- BiPredicate instance that rethrows the checked exception using the Sneaky Throws pattern
-
and
-
or
-
xor
-
negate
-
asFunction
- Returns:
- this ThrowingBiFunction instance as a ThrowingBiFunction
-
uncheck
- Returns:
- a new BiPredicate instance which wraps thrown checked exception instance into a RuntimeException
-