Top Description Methods
org.apache.commons.collections4

public Interface Predicate<T>

Known Direct Subinterfaces
org.apache.commons.collections4.functors.PredicateDecorator
Known Direct Implementers
org.apache.commons.collections4.functors.IdentityPredicate, org.apache.commons.collections4.functors.ComparatorPredicate, org.apache.commons.collections4.functors.EqualPredicate, org.apache.commons.collections4.functors.ExceptionPredicate, org.apache.commons.collections4.functors.FalsePredicate, org.apache.commons.collections4.functors.InstanceofPredicate, org.apache.commons.collections4.functors.NotNullPredicate, org.apache.commons.collections4.functors.NullPredicate, org.apache.commons.collections4.functors.TransformerPredicate, org.apache.commons.collections4.functors.TruePredicate, org.apache.commons.collections4.functors.UniquePredicate
Annotations
@FunctionalInterface
Type Parameters
<T>
the type that the predicate queries

Defines a functor interface implemented by classes that perform a predicate test on an object.

A Predicate is the object equivalent of an if statement. It uses the input object to return a true or false value, and is often used in validation or filtering.

Standard implementations of common predicates are provided by PredicateUtils. These include true, false, instanceof, equals, and, or, not, method invokation and null testing.

Since
1.0

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true or false
evaluate
(T
the object to evaluate, should not be changed
object
)

Use the specified parameter to perform a test that returns true or false.

Method Detail

evaluateback to summary
public boolean evaluate(T object)

Use the specified parameter to perform a test that returns true or false.

Parameters
object:T

the object to evaluate, should not be changed

Returns:boolean

true or false

Exceptions
ClassCastException:
(runtime) if the input is the wrong class
IllegalArgumentException:
(runtime) if the input is invalid
FunctorException:
(runtime) if the predicate encounters a problem