Class PredicateUtil
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.util.PredicateUtil
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Predicate<T>
not(Predicate<T> predicate)
Negates the given 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 wasnull
-
-