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

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

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

Predicate implementation that evaluates to true if the input is not null.

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

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

Constructor Detail

NotNullPredicate

protected NotNullPredicate()
Creates a new instance.

Method Detail

getInstance

public static <T> Predicate<T> getInstance()
Returns a PredicateInstance which evaluates to true if the input object is not null.

Returns:
A PredicateInstance which evaluates to true if the input object is not null.
Since:
Collections15 1.0

evaluate

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

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


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