2.17.2: 2011-06-17

net.sf.basedb.util.filter
Class IdentityFilter<T>

java.lang.Object
  extended by net.sf.basedb.util.filter.IdentityFilter<T>
All Implemented Interfaces:
Filter<T>

public class IdentityFilter<T>
extends Object
implements Filter<T>

A filter implementation that only accepts an object if it is identical (==) to a given object.

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2009-02-05 14:39:25 +0100 (Thu, 05 Feb 2009) $

Field Summary
private  T object
           
 
Constructor Summary
IdentityFilter(T object)
          Create a new filter.
 
Method Summary
 boolean evaluate(T object)
          Evaluate if the given object should pass the filter or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

private final T object
Constructor Detail

IdentityFilter

public IdentityFilter(T object)
Create a new filter.

Parameters:
object - The only object that should pass the filter
Method Detail

evaluate

public boolean evaluate(T object)
Description copied from interface: Filter
Evaluate if the given object should pass the filter or not.

Specified by:
evaluate in interface Filter<T>
Parameters:
object - The object to evaluate
Returns:
TRUE if the object is the same instance as the object given in the constructor, FALSE otherwise

2.17.2: 2011-06-17