Interface CheckedPredicate<T,E extends Exception>

Type Parameters:
T - type of object to test.
E - exception-type if testing fails.
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,E extends Exception>
Like Predicate but can also throw an exception.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(T source)
    Applies a predicate like with Predicate.test(T).
  • Method Details

    • test

      boolean test(T source) throws E
      Applies a predicate like with Predicate.test(T).
      Parameters:
      source - object to be tested.
      Returns:
      true if predicate is satisfied, false otherwise.
      Throws:
      E - an exception that may be thrown.