3.0.2: 2012-01-25

net.sf.basedb.util.overview.filter
Class HasAttributeFilter

java.lang.Object
  extended by net.sf.basedb.util.overview.filter.HasAttributeFilter
All Implemented Interfaces:
Filter<Node>

public class HasAttributeFilter
extends Object
implements Filter<Node>

A filter implementation that checks if a value for a given attribute existsin on a node. It will evaluate to true for all Node:s that has a value for a specific attribute.

Since:
3.0
Author:
Nicklas
Last modified
$Date $

Field Summary
private  NodeAttribute<?> attribute
           
 
Constructor Summary
HasAttributeFilter(NodeAttribute<?> attribute)
          Create a filter that finds nodes that has value for the given attribute.
 
Method Summary
 boolean evaluate(Node node)
          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

attribute

private final NodeAttribute<?> attribute
Constructor Detail

HasAttributeFilter

public HasAttributeFilter(NodeAttribute<?> attribute)
Create a filter that finds nodes that has value for the given attribute.

Parameters:
attribute - The attribute to check
Method Detail

evaluate

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

Specified by:
evaluate in interface Filter<Node>
Parameters:
node - The object to evaluate
Returns:
TRUE if the object passes the filter, FALSE otherwise

3.0.2: 2012-01-25