-
- 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 CheckedPredicate<T>
APredicate
that allows for checked exceptions.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> java.util.function.Predicate<T>
sneaky(CheckedPredicate<T> predicate)
boolean
test(T t)
Evaluates this predicate on the given argument.static <T> java.util.function.Predicate<T>
unchecked(CheckedPredicate<T> predicate)
static <T> java.util.function.Predicate<T>
unchecked(CheckedPredicate<T> function, java.util.function.Consumer<java.lang.Throwable> handler)
-
-
-
Method Detail
-
test
boolean test(T t) throws java.lang.Throwable
Evaluates this predicate on the given argument.- Parameters:
t
- the input argument- Returns:
true
if the input argument matches the predicate, otherwisefalse
- Throws:
java.lang.Throwable
-
sneaky
static <T> java.util.function.Predicate<T> sneaky(CheckedPredicate<T> predicate)
-
unchecked
static <T> java.util.function.Predicate<T> unchecked(CheckedPredicate<T> predicate)
-
unchecked
static <T> java.util.function.Predicate<T> unchecked(CheckedPredicate<T> function, java.util.function.Consumer<java.lang.Throwable> handler)
-
-