org.htmlparser.filters
Class HasSiblingFilter
- Cloneable, NodeFilter, Serializable
public class HasSiblingFilter
This class accepts all tags that have a sibling acceptable to another filter.
End tags are not considered to be siblings of any tag.
mSiblingFilter
protected NodeFilter mSiblingFilter
The filter to apply to the sibling.
HasSiblingFilter
public HasSiblingFilter()
Creates a new instance of HasSiblingFilter.
With no sibling filter, this would always return
false
from
accept(Node)
.
HasSiblingFilter
public HasSiblingFilter(NodeFilter filter)
Creates a new instance of HasSiblingFilter that accepts nodes
with sibling acceptable to the filter.
filter
- The filter to apply to the sibling.
accept
public boolean accept(Node node)
Accept tags with a sibling acceptable to the filter.
- accept in interface NodeFilter
node
- The node to check.
true
if the node has an acceptable sibling,
false
otherwise.
getSiblingFilter
public NodeFilter getSiblingFilter()
Get the filter used by this HasSiblingFilter.
- The filter to apply to siblings.
setSiblingFilter
public void setSiblingFilter(NodeFilter filter)
Set the filter for this HasSiblingFilter.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |