org.apache.commons.collections.functors
Class NullIsFalsePredicate
java.lang.Object
org.apache.commons.collections.functors.NullIsFalsePredicate
- Predicate, PredicateDecorator, Serializable
public final class NullIsFalsePredicate
extends java.lang.Object
Predicate implementation that returns false if the input is null.
$Revision: 1.6 $ $Date: 2004/05/31 16:43:17 $
NullIsFalsePredicate
public NullIsFalsePredicate(Predicate predicate)
Constructor that performs no validation.
Use getInstance
if you want that.
predicate
- the predicate to call after the null check
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning the result of the decorated predicate
once a null check is performed.
- evaluate in interface Predicate
object
- the input object
- true if decorated predicate returns true, false if input is null
getInstance
public static Predicate getInstance(Predicate predicate)
Factory to create the null false predicate.
predicate
- the predicate to decorate, not null
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.