Interface ExBiPredicate<T, U, E extends Exception>

Type Parameters:
T - the type of the first argument to the predicate
U - the type of the second argument the predicate
E - the type of exception thrown
All Superinterfaces:
Wrappable<BiPredicate<T,U>>
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 ExBiPredicate<T, U, E extends Exception> extends Wrappable<BiPredicate<T,U>>
Equivalent of a BiPredicate that can throw exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(T t, U u)
    Evaluates this predicate on the given arguments.
    Wraps this functional interface, allowing it to be used in contexts where exceptions are not allowed to be thrown directly.

    Methods inherited from interface Wrappable

    wrap
  • Method Details

    • test

      boolean test(T t, U u) throws E
      Evaluates this predicate on the given arguments.
      Parameters:
      t - the first input argument
      u - the second input argument
      Returns:
      true if the input arguments match the predicate, otherwise false
      Throws:
      E - potentially
    • wrap

      default @NonNull BiPredicate<T,U> wrap()
      Description copied from interface: Wrappable
      Wraps 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 its cause.

      Specified by:
      wrap in interface Wrappable<T>
      Returns:
      a wrapped instance of type W