E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<DoublePredicate>@FunctionalInterface public interface DoublePredicateWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<DoublePredicate>
double-valued
argument that may throw exception. This is the double-consuming
primitive type specialization of PredicateWithException.
boolean test(double value) throws
E - The functional method.DoublePredicateDoublePredicateDoublePredicateDoublePredicate| Modifier and Type | Method | Description |
|---|---|---|
default DoublePredicateWithException<E> |
and(DoublePredicateWithException<? extends E> other) |
Returns a composed predicate that represents a short-circuiting logical AND
of this predicate and another.
|
static <E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a predicate that always throw exception.
|
static <E extends Exception> |
ignored(DoublePredicateWithException<E> predicate) |
Converts a
DoublePredicateWithException to a lifted
DoublePredicate returning false in case of exception. |
static <E extends Exception> |
lifted(DoublePredicateWithException<E> predicate) |
Converts a
DoublePredicateWithException to a lifted
DoublePredicate returning false in case of exception. |
default DoublePredicateWithException<E> |
negate() |
Returns a predicate that represents the logical negation of this predicate.
|
static <E extends Exception> |
negate(DoublePredicateWithException<E> predicate) |
Negate a
DoublePredicateWithException. |
default DoublePredicateWithException<E> |
or(DoublePredicateWithException<? extends E> other) |
Returns a composed predicate that represents a short-circuiting logical OR of
this predicate and another.
|
boolean |
test(double value) |
Evaluates this predicate on the given argument.
|
static <E extends Exception> |
unchecked(DoublePredicateWithException<E> predicate) |
Converts a
DoublePredicateWithException to a DoublePredicate
that wraps exception to RuntimeException. |
static <E extends Exception> |
unchecked(DoublePredicateWithException<E> predicate,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
PredicateWithException to a Predicate that wraps
exception to RuntimeException by using the provided mapping function. |
default DoublePredicate |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckboolean test(double value)
throws E extends Exception
value - the input argumenttrue if the input argument matches the predicate, otherwise
falseE - any exceptionE extends ExceptionDoublePredicate.test(double)default DoublePredicate uncheckOrIgnore(boolean uncheck)
PrimitiveReturnExceptionHandlerSupportuncheckOrIgnore in interface PrimitiveReturnExceptionHandlerSupport<E extends Exception>uncheck - create unchecked version of the function when true, else ignored
version.default DoublePredicateWithException<E> and(DoublePredicateWithException<? 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(DoublePredicateWithException),
negate()default DoublePredicateWithException<E> negate()
and(DoublePredicateWithException),
or(DoublePredicateWithException)static <E extends Exception> DoublePredicateWithException<E> negate(DoublePredicateWithException<E> predicate)
DoublePredicateWithException.E - the type of the potential exceptionpredicate - to be negatenegate()default DoublePredicateWithException<E> or(DoublePredicateWithException<? 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(DoublePredicateWithException),
negate()static <E extends Exception> DoublePredicateWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exception the type of the input object
to the functionstatic <E extends Exception> DoublePredicate unchecked(DoublePredicateWithException<E> predicate)
DoublePredicateWithException to a DoublePredicate
that wraps exception to RuntimeException.E - the type of the potential exceptionpredicate - to be uncheckedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(DoublePredicateWithException, Function)static <E extends Exception> DoublePredicate unchecked(DoublePredicateWithException<E> predicate, Function<Exception,RuntimeException> exceptionMapper)
PredicateWithException to a Predicate that wraps
exception to RuntimeException by using the provided mapping function.E - 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(DoublePredicateWithException)static <E extends Exception> DoublePredicate lifted(DoublePredicateWithException<E> predicate)
DoublePredicateWithException to a lifted
DoublePredicate returning false in case of exception.E - the type of the potential exceptionpredicate - to be liftedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.lift()static <E extends Exception> DoublePredicate ignored(DoublePredicateWithException<E> predicate)
DoublePredicateWithException to a lifted
DoublePredicate returning false in case of exception.E - the type of the potential exceptionpredicate - to be liftedNullPointerException - if predicate is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.