Interface PredicateEx<T>

  • Type Parameters:
    T - the type of the input to the predicate
    All Superinterfaces:
    java.util.function.Predicate<T>, java.io.Serializable
    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 PredicateEx<T>
    extends java.util.function.Predicate<T>, java.io.Serializable
    Serializable variant of java.util.function.Predicate which declares checked exception.
    Since:
    4.0
    • Method Detail

      • testEx

        boolean testEx​(T t)
                throws java.lang.Exception
        Exception-declaring version of Predicate.test(T).
        Throws:
        java.lang.Exception - in case of any exceptional case
      • test

        default boolean test​(T t)
        Specified by:
        test in interface java.util.function.Predicate<T>
      • alwaysTrue

        @Nonnull
        static <T> PredicateEx<T> alwaysTrue()
        Returns a predicate that always evaluates to true.
        Type Parameters:
        T - the type of the input to the predicate
      • alwaysFalse

        @Nonnull
        static <T> PredicateEx<T> alwaysFalse()
        Returns a predicate that always evaluates to false.
        Type Parameters:
        T - the type of the input to the predicate
      • isEqual

        @Nonnull
        static <T> PredicateEx<T> isEqual​(java.lang.Object other)
        Serializable variant of
        Type Parameters:
        T - the type of the input to the predicate java.util.function.Predicate#isEqual(Object).
      • and

        @Nonnull
        default PredicateEx<T> and​(PredicateEx<? super T> other)
        Serializable variant of java.util.function.Predicate#and(Predicate).
      • negate

        @Nonnull
        default PredicateEx<T> negate()
        Serializable variant of Predicate.negate().
        Specified by:
        negate in interface java.util.function.Predicate<T>
      • or

        @Nonnull
        default PredicateEx<T> or​(PredicateEx<? super T> other)
        Serializable variant of java.util.function.Predicate#or(Predicate).