public class XorFilter extends java.lang.Object implements NodeFilter
| 构造器和说明 |
|---|
XorFilter()
Creates a new instance of an XorFilter.
|
XorFilter(NodeFilter[] predicates)
Creates an XorFilter that accepts nodes acceptable an odd number of the given filters.
|
XorFilter(NodeFilter left,
NodeFilter right)
Creates an XorFilter that accepts nodes acceptable to either filter, but not both.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public XorFilter()
false
to accept(org.htmlparser.Node).public XorFilter(NodeFilter left, NodeFilter right)
left - One filter.right - The other filter.public XorFilter(NodeFilter[] predicates)
predicates - The list of filters.public NodeFilter[] getPredicates()
public void setPredicates(NodeFilter[] predicates)
predicates - The list of predidcates to use in accept(org.htmlparser.Node).public boolean accept(Node node)
accept 在接口中 NodeFilternode - The node to check.true if an odd number of the predicate filters find the node
is acceptable, false otherwise.