Interface PredicateWithException<T>

  • Type Parameters:
    T - the type of the argument
    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 PredicateWithException<T>
    Predicate interface that allows exceptions.
    • Method Detail

      • test

        boolean test​(T t)
              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • orElseThrow

        default java.util.function.Predicate<T> orElseThrow()
      • orElse

        default java.util.function.Predicate<T> orElse​(boolean orElse)
      • orElseGet

        default java.util.function.Predicate<T> orElseGet​(java.util.function.BooleanSupplier orElseGet)
      • asPredicate

        static <T> java.util.function.Predicate<T> asPredicate​(PredicateWithException<T> unchecked)
      • asPredicateOrElse

        static <T> java.util.function.Predicate<T> asPredicateOrElse​(PredicateWithException<T> unchecked,
                                                                     boolean orElse)
      • asPredicateOrElseGet

        static <T> java.util.function.Predicate<T> asPredicateOrElseGet​(PredicateWithException<T> unchecked,
                                                                        java.util.function.BooleanSupplier orElseGet)