public class HasSiblingFilter extends java.lang.Object implements NodeFilter
构造器和说明 |
---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
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
在接口中 NodeFilter
node
- The node to check.true
if the node has an acceptable sibling,
false
otherwise.