Class Predicates


  • public class Predicates
    extends java.lang.Object
    Factory for Predicate.
    Since:
    3.18.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.function.Predicate<T> falsePredicate()
      Gets the Predicate singleton that always returns false.
      static <T> java.util.function.Predicate<T> truePredicate()
      Gets the Predicate singleton that always returns true.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • falsePredicate

        public static <T> java.util.function.Predicate<T> falsePredicate()
        Gets the Predicate singleton that always returns false.
        Type Parameters:
        T - the type of the input to the predicate.
        Returns:
        the Predicate singleton.
      • truePredicate

        public static <T> java.util.function.Predicate<T> truePredicate()
        Gets the Predicate singleton that always returns true.
        Type Parameters:
        T - the type of the input to the predicate.
        Returns:
        the Predicate singleton.