public class AndFilter extends java.lang.Object implements NodeFilter
Modifier and Type | Field and Description |
---|---|
protected NodeFilter[] |
mPredicates
The predicates that are to be and'ed together;
|
Constructor and Description |
---|
AndFilter()
Creates a new instance of an AndFilter.
|
AndFilter(NodeFilter left,
NodeFilter right)
Creates an AndFilter that accepts nodes acceptable to both filters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Node node)
Accept nodes that are acceptable to all of it's predicate filters.
|
NodeFilter[] |
getPredicates()
Get the predicates used by this AndFilter.
|
void |
setPredicates(NodeFilter[] predicates)
Set the predicates for this AndFilter.
|
protected NodeFilter[] mPredicates
public AndFilter()
true
to accept(org.htmlparser.Node)
.public AndFilter(NodeFilter left, NodeFilter right)
left
- One filter.right
- The other filter.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
in interface NodeFilter
node
- The node to check.true
if all the predicate filters find the node
is acceptable, false
otherwise.HTML Parser is an open source library released under LGPL.