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