T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exception of the functionExceptionHandlerSupport<T,U>, PrimitiveReturnExceptionHandlerSupport<BiPredicate<T,U>>@FunctionalInterface public interface BiPredicateWithException<T,U,E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<BiPredicate<T,U>>
PredicateWithException.
boolean test(T t, U u) throws
E - The functional method.BiPredicate<T, U>BiPredicate<T, U>BiPredicate<T, U>BiPredicate| Modifier and Type | Method | Description |
|---|---|---|
default BiPredicateWithException<T,U,E> |
and(BiPredicateWithException<? super T,? super U,? extends E> other) |
Returns a composed predicate that represents a short-circuiting logical AND
of this predicate and another.
|
static <T,U,E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a predicate that always throw exception.
|
static <T,U,E extends Exception> |
ignored(BiPredicateWithException<T,U,E> predicate) |
Converts a
BiPredicateWithException to a lifted BiPredicate
returning false in case of exception. |
static <T,U,E extends Exception> |
lifted(BiPredicateWithException<T,U,E> predicate) |
Converts a
BiPredicateWithException to a lifted BiPredicate
returning false in case of exception. |
default BiPredicateWithException<T,U,E> |
negate() |
Returns a predicate that represents the logical negation of this predicate.
|
static <T,U,E extends Exception> |
negate(BiPredicateWithException<T,U,E> predicate) |
Negate a
DoublePredicateWithException. |
default BiPredicateWithException<T,U,E> |
or(BiPredicateWithException<? super T,? super U,? extends E> other) |
Returns a composed predicate that represents a short-circuiting logical OR of
this predicate and another.
|
boolean |
test(T t,
U u) |
Evaluates this predicate on the given arguments.
|
static <T,U,E extends Exception> |
unchecked(BiPredicateWithException<T,U,E> predicate) |
Converts a
BiPredicateWithException to a BiPredicate that
wraps to RuntimeException. |
static <T,U,E extends Exception> |
unchecked(BiPredicateWithException<T,U,E> predicate,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
BiPredicateWithException to a BiPredicate that
wraps to RuntimeException by using the provided mapping function. |
default BiPredicate<T,U> |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckboolean test(T t, U u) throws E extends Exception
t - the first input argumentu - the second input argumenttrue if the input arguments match the predicate, otherwise
falseE - any exceptionE extends ExceptionBiPredicate.test(Object, Object)default BiPredicate<T,U> uncheckOrIgnore(boolean uncheck)
PrimitiveReturnExceptionHandlerSupportuncheckOrIgnore in interface PrimitiveReturnExceptionHandlerSupport<T>uncheck - create unchecked version of the function when true, else ignored
version.default BiPredicateWithException<T,U,E> and(BiPredicateWithException<? super T,? super U,? extends E> other)
false, then the other predicate is not
evaluated.
Any exceptions thrown during evaluation of either predicate are relayed to
the caller; if evaluation of this predicate throws an exception, the
other predicate will not be evaluated.
other - a predicate that will be logically-ANDed with this predicateother predicateNullPointerException - if other is nullor(BiPredicateWithException),
negate()default BiPredicateWithException<T,U,E> negate()
and(BiPredicateWithException),
or(BiPredicateWithException)static <T,U,E extends Exception> BiPredicateWithException<T,U,E> negate(BiPredicateWithException<T,U,E> predicate)
DoublePredicateWithException.T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exceptionpredicate - to be negatenegate()default BiPredicateWithException<T,U,E> or(BiPredicateWithException<? super T,? super U,? extends E> other)
true, then the other predicate is not evaluated.
Any exceptions thrown during evaluation of either predicate are relayed to
the caller; if evaluation of this predicate throws an exception, the
other predicate will not be evaluated.
other - a predicate that will be logically-ORed with this predicateother predicateNullPointerException - if other is nulland(BiPredicateWithException),
negate()static <T,U,E extends Exception> BiPredicateWithException<T,U,E> failing(Supplier<E> exceptionBuilder)
T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <T,U,E extends Exception> BiPredicate<T,U> unchecked(BiPredicateWithException<T,U,E> predicate)
BiPredicateWithException to a BiPredicate that
wraps to RuntimeException.T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exceptionpredicate - to be uncheckedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(BiPredicateWithException, Function)static <T,U,E extends Exception> BiPredicate<T,U> unchecked(BiPredicateWithException<T,U,E> predicate, Function<Exception,RuntimeException> exceptionMapper)
BiPredicateWithException to a BiPredicate that
wraps to RuntimeException by using the provided mapping function.T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exceptionpredicate - the be uncheckedexceptionMapper - a function to convert the exception to the runtime exception.NullPointerException - if predicate or exceptionMapper is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(BiPredicateWithException)static <T,U,E extends Exception> BiPredicate<T,U> lifted(BiPredicateWithException<T,U,E> predicate)
BiPredicateWithException to a lifted BiPredicate
returning false in case of exception.T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exceptionpredicate - to be liftedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.lift()static <T,U,E extends Exception> BiPredicate<T,U> ignored(BiPredicateWithException<T,U,E> predicate)
BiPredicateWithException to a lifted BiPredicate
returning false in case of exception.T - the type of the first argument to the predicateU - the type of the second argument the predicateE - the type of the potential exceptionpredicate - to be liftedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.