net.sf.basedb.util.overview.filter
Class HasAttributeFilter
java.lang.Object
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 $
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 |
attribute
private final NodeAttribute<?> attribute
HasAttributeFilter
public HasAttributeFilter(NodeAttribute<?> attribute)
- Create a filter that finds nodes that has value for the given
attribute.
- Parameters:
attribute
- The attribute to check
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