org.apache.commons.collections.functors
Class NullIsTruePredicate
- Predicate, PredicateDecorator, Serializable
public final class NullIsTruePredicate
Predicate implementation that returns true if the input is null.
$Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
NullIsTruePredicate
public NullIsTruePredicate(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 or input is null
getInstance
public static Predicate getInstance(Predicate predicate)
Factory to create the null true predicate.
predicate
- the predicate to decorate, not null
Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.