Top Description Fields Constructors Methods
org.apache.commons.lang3.function

public Class Predicates

extends Object
Class Inheritance
Imports
java.util.function.Predicate

Factory for Predicate.
Since
3.18.0

Field Summary

Modifier and TypeField and Description
private static final Predicate<?>
private static final Predicate<?>

Constructor Summary

AccessConstructor and Description
private
Predicates()

No instances needed.

Method Summary

Modifier and TypeMethod and Description
public static <
the type of the input to the predicate.
T
>
Predicate<T>

Returns:

the Predicate singleton.
falsePredicate
()

Gets the Predicate singleton that always returns false.

public static <
the type of the input to the predicate.
T
>
Predicate<T>

Returns:

the Predicate singleton.
truePredicate
()

Gets the Predicate singleton that always returns true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FALSEback to summary
private static final Predicate<?> FALSE
TRUEback to summary
private static final Predicate<?> TRUE

Constructor Detail

Predicatesback to summary
private Predicates()

No instances needed.

Method Detail

falsePredicateback to summary
public static <T> Predicate<T> falsePredicate()

Gets the Predicate singleton that always returns false.

Parameters
<T>
the type of the input to the predicate.
Returns:Predicate<T>

the Predicate singleton.

Annotations
@SuppressWarnings:unchecked
truePredicateback to summary
public static <T> Predicate<T> truePredicate()

Gets the Predicate singleton that always returns true.

Parameters
<T>
the type of the input to the predicate.
Returns:Predicate<T>

the Predicate singleton.

Annotations
@SuppressWarnings:unchecked