net.sf.collections15.functors.predicate
Class NullPredicate<E>

java.lang.Object
  extended by net.sf.collections15.functors.predicate.NullPredicate<E>
All Implemented Interfaces:
java.io.Serializable, Predicate<E>

public final class NullPredicate<E>
extends java.lang.Object
implements Predicate<E>, java.io.Serializable

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

Since:
Collections15 1.0
Author:
Stephen Colebourne, Chris Lambrou (port to Java 5.0)
See Also:
Serialized Form

Constructor Summary
protected NullPredicate()
          creates a new instance.
 
Method Summary
 boolean evaluate(E object)
          Evaluates the Predicate returning true only if the input is null.
static
<T> NullPredicate<T>
getInstance()
          Returns a Predicate that evaluates to true only if the input is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullPredicate

protected NullPredicate()
creates a new instance.

Method Detail

getInstance

public static <T> NullPredicate<T> getInstance()
Returns a Predicate that evaluates to true only if the input is null.

Returns:
A Predicate that evaluates to true only if the input is null.
Since:
Collections15 1.0

evaluate

public boolean evaluate(E object)
Evaluates the Predicate returning true only if the input is null.

Specified by:
evaluate in interface Predicate<E>
Parameters:
object - The input object to evaluate.
Returns:
true if the input is null.


Copyright © 2001-2005 SourceForge.net. All Rights Reserved.