Package org.htmlparser.filters
Class NotFilter
java.lang.Object
org.htmlparser.filters.NotFilter
- All Implemented Interfaces:
Serializable
,Cloneable
,NodeFilter
Accepts all nodes not acceptable to it's predicate filter.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of a NotFilter.NotFilter
(NodeFilter predicate) Creates a NotFilter that accepts nodes not acceptable to the predicate. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Accept nodes that are not acceptable to the predicate filter.Get the predicate used by this NotFilter.void
setPredicate
(NodeFilter predicate) Set the predicate for this NotFilter.
-
Field Details
-
mPredicate
The filter to gainsay.
-
-
Constructor Details
-
NotFilter
public NotFilter()Creates a new instance of a NotFilter. With no predicates, this would always returnfalse
fromaccept(org.htmlparser.Node)
.- See Also:
-
NotFilter
Creates a NotFilter that accepts nodes not acceptable to the predicate.- Parameters:
predicate
- The filter to consult.
-
-
Method Details
-
getPredicate
Get the predicate used by this NotFilter.- Returns:
- The predicate currently in use.
-
setPredicate
Set the predicate for this NotFilter.- Parameters:
predicate
- The predidcate to use inaccept(org.htmlparser.Node)
.
-
accept
Accept nodes that are not acceptable to the predicate filter.- Specified by:
accept
in interfaceNodeFilter
- Parameters:
node
- The node to check.- Returns:
true
if the node is not acceptable to the predicate filter,false
otherwise.
-