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