net.sf.collections15
Interface Predicate<E>

All Known Implementing Classes:
AbstractMultplePredicateDecorator, AbstractPredicateDecorator, AllPredicate, AnyPredicate, EqualPredicate, ExceptionPredicate, FalsePredicate, InstanceofPredicate, NonePredicate, NotNullPredicate, NotPredicate, NullIsExceptionPredicate, NullIsFalsePredicate, NullIsTruePredicate, NullPredicate, OnePredicate, SamePredicate, TransformedPredicate, TransformerPredicate, TruePredicate, UniquePredicate

public interface Predicate<E>

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:
Commons Collections15 1.0
Version:
$Revision: 1.2 $ $Date: 2004/10/17 01:02:42 $
Author:
James Strachan, Stephen Colebourne

Method Summary
 boolean evaluate(E object)
          Use the specified parameter to perform a test that returns true or false.
 

Method Detail

evaluate

boolean evaluate(E object)
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 class
java.lang.IllegalArgumentException - (runtime) if the input is invalid
FunctorException - (runtime) if the predicate encounters a problem


Copyright © 2001-2005 SourceForge.net. All Rights Reserved.