Class PredicateUtil


  • public final class PredicateUtil
    extends Object
    Utilities used in context of java Predicate.
    • Method Detail

      • not

        public static <T> Predicate<T> not​(Predicate<T> predicate)
        Negates the given predicate. This can be used in streams when casting the method reference to a predicate is not really legible.
        Type Parameters:
        T - the type of the predicate
        Parameters:
        predicate - the predicate to be negated
        Returns:
        the negated predicate or null if the given predicate was null