Class NodeTypeFilter

  • All Implemented Interfaces:
    Filter<Node>

    public class NodeTypeFilter
    extends Object
    implements Filter<Node>
    A filter implementation that matches the node type. It will evaluate to true for all Node:s whose Node.getNodeType() method matches the given node type.
    Since:
    3.16
    Author:
    Nicklas
    • Field Detail

    • Constructor Detail

      • NodeTypeFilter

        public NodeTypeFilter​(Node.Type nodeType)
        Create a filter that finds nodes of the given node type.
        Parameters:
        nodeType - The node type to look for
    • 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