org.htmlparser.filters
public class XorFilter extends Object implements NodeFilter
| Field Summary | |
|---|---|
| protected NodeFilter[] | mPredicates
The predicates that are to be xor'ed together; |
| Constructor Summary | |
|---|---|
| XorFilter()
Creates a new instance of an XorFilter.
| |
| XorFilter(NodeFilter left, NodeFilter right)
Creates an XorFilter that accepts nodes acceptable to either filter, but not both. | |
| XorFilter(NodeFilter[] predicates)
Creates an XorFilter that accepts nodes acceptable an odd number of the given filters. | |
| Method Summary | |
|---|---|
| boolean | accept(Node node)
Accept nodes that are acceptable to an odd number of its predicate filters. |
| NodeFilter[] | getPredicates()
Get the predicates used by this XorFilter. |
| void | setPredicates(NodeFilter[] predicates)
Set the predicates for this XorFilter. |
false
to XorFilter.See Also: XorFilter
Parameters: left One filter. right The other filter.
Parameters: predicates The list of filters.
Parameters: node The node to check.
Returns: true if an odd number of the predicate filters find the node
is acceptable, false otherwise.
Returns: The predicates currently in use.
Parameters: predicates The list of predidcates to use in XorFilter.
| HTML Parser is an open source library released under LGPL. | |