Class NotFilter

java.lang.Object
org.htmlparser.filters.NotFilter
All Implemented Interfaces:
Serializable, Cloneable, NodeFilter

public class NotFilter extends Object implements NodeFilter
Accepts all nodes not acceptable to it's predicate filter.
See Also:
  • Field Details

    • mPredicate

      protected NodeFilter mPredicate
      The filter to gainsay.
  • Constructor Details

  • Method Details

    • getPredicate

      public NodeFilter getPredicate()
      Get the predicate used by this NotFilter.
      Returns:
      The predicate currently in use.
    • setPredicate

      public void setPredicate(NodeFilter predicate)
      Set the predicate for this NotFilter.
      Parameters:
      predicate - The predidcate to use in accept(org.htmlparser.Node).
    • accept

      public boolean accept(Node node)
      Accept nodes that are not acceptable to the predicate filter.
      Specified by:
      accept in interface NodeFilter
      Parameters:
      node - The node to check.
      Returns:
      true if the node is not acceptable to the predicate filter, false otherwise.