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

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

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

Predicate implementation that always evaluates to true.

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

Constructor Summary
protected TruePredicate()
          Creates a new instance.
 
Method Summary
 boolean evaluate(E object)
          Evaluates the Predicate, always returning true.
static
<T> Predicate<T>
getInstance()
          ReturnsFactory returning the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TruePredicate

protected TruePredicate()
Creates a new instance.

Method Detail

getInstance

public static <T> Predicate<T> getInstance()
ReturnsFactory returning the singleton instance.

Returns:
the singleton instance
Since:
Commons Collections 3.1

evaluate

public boolean evaluate(E object)
Evaluates the Predicate, always returning true.

Specified by:
evaluate in interface Predicate<E>
Parameters:
object - The input object.
Returns:
Always returns true.


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