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 exists 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 Details

  • Constructor Details

    • HasAttributeFilter

      public HasAttributeFilter​(NodeAttribute<?> attribute)
      Create a filter that finds nodes that has value for the given attribute.
      Parameters:
      attribute - The attribute to check
    • HasAttributeFilter

      public HasAttributeFilter​(NodeAttribute<?> attribute, Object value)
      Create a filter that finds nodes that has a specific value for the given attribute.
      Parameters:
      attribute - The attribute to check
      value - The value that must match
      Since:
      3.3
  • Method Details

    • 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