public class HasSiblingFilter extends java.lang.Object implements NodeFilter
Modifier and Type | Field and Description |
---|---|
protected NodeFilter |
mSiblingFilter
The filter to apply to the sibling.
|
Constructor and Description |
---|
HasSiblingFilter()
Creates a new instance of HasSiblingFilter.
|
HasSiblingFilter(NodeFilter filter)
Creates a new instance of HasSiblingFilter that accepts nodes
with sibling acceptable to the filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Node node)
Accept tags with a sibling acceptable to the filter.
|
NodeFilter |
getSiblingFilter()
Get the filter used by this HasSiblingFilter.
|
void |
setSiblingFilter(NodeFilter filter)
Set the filter for this HasSiblingFilter.
|
protected NodeFilter mSiblingFilter
public HasSiblingFilter()
false
from accept(org.htmlparser.Node)
.public HasSiblingFilter(NodeFilter filter)
filter
- The filter to apply to the sibling.public NodeFilter getSiblingFilter()
public void setSiblingFilter(NodeFilter filter)
filter
- The filter to apply to siblings in accept(org.htmlparser.Node)
.public boolean accept(Node node)
accept
in interface NodeFilter
node
- The node to check.true
if the node has an acceptable sibling,
false
otherwise.HTML Parser is an open source library released under LGPL.