Predicates (Apache Commons Lang 3.20.0 API)
Description: declaration: package: org.apache.commons.lang3.function, class: Predicates

# Class Predicates

java.lang.Object
org.apache.commons.lang3.function.Predicates

public class Predicates extends Object
Factory for `Predicate`.

Since:
  3.18.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> Predicate<T>`
  `falsePredicate()`
  Gets the Predicate singleton that always returns false.
  `static <T> Predicate<T>`
  `truePredicate()`
  Gets the Predicate singleton that always returns true.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### falsePredicate

    public static <T> 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> 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.