Interface ThrowingBiPredicate<T,​U,​E extends java.lang.Exception>

  • Type Parameters:
    T - the type of the first argument to the predicate
    U - the type of the second argument to the predicate
    E - the type of the thrown checked exception
    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 ThrowingBiPredicate<T,​U,​E extends java.lang.Exception>
    Represents a predicate (boolean-valued function) of two arguments. This is the two-arity specialization of ThrowingPredicate. Function may throw a checked exception.
    • Method Detail

      • test

        boolean test​(T t,
                     U u)
              throws E extends java.lang.Exception
        Throws:
        E extends java.lang.Exception
      • unchecked

        static <T,​U> java.util.function.BiPredicate<T,​U> unchecked​(ThrowingBiPredicate<T,​U,​?> predicate)
      • sneaky

        static <T,​U> java.util.function.BiPredicate<T,​U> sneaky​(ThrowingBiPredicate<T,​U,​?> predicate)
        Returns:
        BiPredicate instance that rethrows the checked exception using the Sneaky Throws pattern
      • asFunction

        default ThrowingBiFunction<T,​U,​java.lang.Boolean,​E> asFunction()
        Returns:
        this ThrowingBiFunction instance as a ThrowingBiFunction
      • uncheck

        default java.util.function.BiPredicate<T,​U> uncheck()
        Returns:
        a new BiPredicate instance which wraps thrown checked exception instance into a RuntimeException