⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.functors

Class EqualPredicate

java.lang.Object
|
+--org.apache.commons.collections.functors.EqualPredicate

All Implemented Interfaces:
Predicate, Serializable


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

Predicate implementation that returns true if the input is the same object as the one stored in this predicate by equals.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

EqualPredicate(Object object)

Constructor that performs no validation.

Method Summary

boolean

evaluate(Object object)

Return the predicate result.

static Predicate

getInstance(Object object)

Factory to create the identity predicate.

Constructor Details

EqualPredicate

public EqualPredicate(Object object)

Constructor that performs no validation. Use getInstance if you want that.

Parameters:
object - the object to compare to

Method Details

evaluate

public boolean evaluate(Object object)

Return the predicate result.

Parameters:
object

getInstance

public static Predicate getInstance(Object object)

Factory to create the identity predicate.

Parameters:
object - the object to compare to
Returns:
the predicate
Throws:
- if the predicate is null