Interface ExIntPredicate<E extends Exception>
- Type Parameters:
E- the type of exception thrown
- All Superinterfaces:
Wrappable<IntPredicate>
- 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 ExIntPredicate<E extends Exception>
extends Wrappable<IntPredicate>
Equivalent of a
IntPredicate that can throw exceptions.-
Method Summary
Modifier and TypeMethodDescriptionbooleantest(int value) Evaluates this predicate on the given argument.default @NonNull IntPredicatewrap()Wraps this functional interface, allowing it to be used in contexts where exceptions are not allowed to be thrown directly.
-
Method Details
-
test
boolean test(int value) throws E Evaluates this predicate on the given argument.- Parameters:
value- the input argument- Returns:
trueif the input argument matches the predicate, otherwisefalse- Throws:
E- potentially
-
wrap
Description copied from interface:WrappableWraps this functional interface, allowing it to be used in contexts where exceptions are not allowed to be thrown directly.If a checked exception is thrown, an
ExException, which is a runtime exception, will be thrown instead. This will have the original exception as itscause.
-