org.apache.commons.collections.functors

Class NullPredicate

public final class NullPredicate extends Object implements Predicate, Serializable

Predicate implementation that returns true if the input is 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 input is 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 input is null.

Parameters: object the input object

Returns: true if input is 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.