Package org.apache.commons.collections4
Interface Predicate<T>
-
- Type Parameters:
T- the type of the input to the predicate.
- All Superinterfaces:
java.util.function.Predicate<T>
- All Known Subinterfaces:
PredicateDecorator<T>
- All Known Implementing Classes:
AbstractPredicate,AbstractQuantifierPredicate,AllPredicate,AndPredicate,AnyPredicate,ComparatorPredicate,EqualPredicate,ExceptionPredicate,FalsePredicate,IdentityPredicate,InstanceofPredicate,NonePredicate,NotNullPredicate,NotPredicate,NullIsExceptionPredicate,NullIsFalsePredicate,NullIsTruePredicate,NullPredicate,OnePredicate,OrPredicate,TransformedPredicate,TransformerPredicate,TruePredicate,UniquePredicate
@Deprecated public interface Predicate<T> extends java.util.function.Predicate<T>
Deprecated.UsePredicate.Defines a functor interface implemented by classes that perform a predicate test on an object.A
Predicateis the object equivalent of anifstatement. 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 invocation and null testing.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanevaluate(T object)Deprecated.Use the specified parameter to perform a test that returns true or false.default booleantest(T t)Deprecated.
-
-
-
Method Detail
-
evaluate
boolean evaluate(T object)
Deprecated.Use the specified parameter to perform a test that returns true or false.- Parameters:
object- the object to evaluate, should not be changed- Returns:
- true or false
- Throws:
java.lang.ClassCastException- (runtime) if the input is the wrong classjava.lang.IllegalArgumentException- (runtime) if the input is invalidFunctorException- (runtime) if the predicate encounters a problem
-
-