org.apache.commons.collections.functors

Class NotNullPredicate

public final class NotNullPredicate extends Object implements Predicate, Serializable

Predicate implementation that returns true if the input is not null.

Since: Commons Collections 3.0

Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $

Author: Stephen Colebourne

Field Summary
static PredicateINSTANCE
Singleton predicate instance
Method Summary
booleanevaluate(Object object)
Evaluates the predicate returning true if the object does not equal null.
static PredicategetInstance()
Factory returning the singleton instance.

Field Detail

INSTANCE

public static final Predicate INSTANCE
Singleton predicate instance

Method Detail

evaluate

public boolean evaluate(Object object)
Evaluates the predicate returning true if the object does not equal null.

Parameters: object the object to evaluate

Returns: true if not null

getInstance

public static Predicate getInstance()
Factory returning the singleton instance.

Returns: the singleton instance

Since: Commons Collections 3.1

Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.