org.apache.commons.collections.functors

Class NullPredicate

Implemented Interfaces:
Predicate, Serializable

public final class NullPredicate
extends java.lang.Object
implements Predicate, Serializable

Predicate implementation that returns true if the input is null.
Version:
$Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $
Author:
Stephen Colebourne
Since:
Commons Collections 3.0

Field Summary

static Predicate
INSTANCE
Singleton predicate instance

Method Summary

boolean
evaluate(Object object)
Evaluates the predicate returning true if the input is null.
static Predicate
getInstance()
Factory returning the singleton instance.

Field Details

INSTANCE

public static final Predicate INSTANCE
Singleton predicate instance

Method Details

evaluate

public boolean evaluate(Object object)
Evaluates the predicate returning true if the input is null.
Specified by:
evaluate in interface Predicate
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-2006 Apache Software Foundation. All Rights Reserved.