Package de.rwth.swc.coffee4j.engine.util
Class PredicateUtil
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.util.PredicateUtil
-
public final class PredicateUtil extends java.lang.ObjectUtilities used in context of javaPredicate.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.function.Predicate<T>not(java.util.function.Predicate<T> predicate)Negates the given predicate.
-
-
-
Method Detail
-
not
public static <T> java.util.function.Predicate<T> not(java.util.function.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
nullif the given predicate wasnull
-
-