public class OrFilter extends java.lang.Object implements NodeFilter
| 构造器和说明 |
|---|
OrFilter()
Creates a new instance of an OrFilter.
|
OrFilter(NodeFilter[] predicates)
Creates an OrFilter that accepts nodes acceptable to any of the given filters.
|
OrFilter(NodeFilter left,
NodeFilter right)
Creates an OrFilter that accepts nodes acceptable to either filter.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
accept(Node node)
Accept nodes that are acceptable to any of its predicate filters.
|
NodeFilter[] |
getPredicates()
Get the predicates used by this OrFilter.
|
void |
setPredicates(NodeFilter[] predicates)
Set the predicates for this OrFilter.
|
public OrFilter()
false
to accept(org.htmlparser.Node).public OrFilter(NodeFilter left, NodeFilter right)
left - One filter.right - The other filter.public OrFilter(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 any of the predicate filters find the node
is acceptable, false otherwise.