Package com.pivovarit.function
Interface ThrowingBiPredicate<T,U,E extends java.lang.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.
@FunctionalInterface public interface ThrowingBiPredicate<T,U,E extends java.lang.Exception>
Represents a predicate (boolean-valued function) of two arguments. This is the two-arity specialization ofThrowingPredicate
. Function may throw a checked exception.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ThrowingBiPredicate<T,U,E>
and(ThrowingBiPredicate<? super T,? super U,? extends E> other)
default ThrowingBiFunction<T,U,java.lang.Boolean,E>
asFunction()
default ThrowingBiPredicate<T,U,E>
negate()
default ThrowingBiPredicate<T,U,E>
or(ThrowingBiPredicate<? super T,? super U,? extends E> other)
static <T,U>
java.util.function.BiPredicate<T,U>sneaky(ThrowingBiPredicate<T,U,?> predicate)
boolean
test(T t, U u)
default java.util.function.BiPredicate<T,U>
uncheck()
static <T,U>
java.util.function.BiPredicate<T,U>unchecked(ThrowingBiPredicate<T,U,?> predicate)
default ThrowingBiPredicate<T,U,E>
xor(ThrowingBiPredicate<? super T,? super U,? extends E> other)
-
-
-
Method Detail
-
test
boolean test(T t, U u) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
unchecked
static <T,U> java.util.function.BiPredicate<T,U> unchecked(ThrowingBiPredicate<T,U,?> predicate)
-
sneaky
static <T,U> java.util.function.BiPredicate<T,U> sneaky(ThrowingBiPredicate<T,U,?> predicate)
- Returns:
- BiPredicate instance that rethrows the checked exception using the Sneaky Throws pattern
-
and
default ThrowingBiPredicate<T,U,E> and(ThrowingBiPredicate<? super T,? super U,? extends E> other)
-
or
default ThrowingBiPredicate<T,U,E> or(ThrowingBiPredicate<? super T,? super U,? extends E> other)
-
xor
default ThrowingBiPredicate<T,U,E> xor(ThrowingBiPredicate<? super T,? super U,? extends E> other)
-
negate
default ThrowingBiPredicate<T,U,E> negate()
-
asFunction
default ThrowingBiFunction<T,U,java.lang.Boolean,E> asFunction()
- Returns:
- this ThrowingBiFunction instance as a ThrowingBiFunction
-
-