public class NodeClassFilter extends java.lang.Object implements NodeFilter
构造器和说明 |
---|
NodeClassFilter()
Creates a NodeClassFilter that accepts Html tags.
|
NodeClassFilter(java.lang.Class cls)
Creates a NodeClassFilter that accepts tags of the given class.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
accept(Node node)
Accept nodes that are assignable from the class provided in
the constructor.
|
java.lang.Class |
getMatchClass()
Get the class to match.
|
void |
setMatchClass(java.lang.Class cls)
Set the class to match.
|
public NodeClassFilter()
public NodeClassFilter(java.lang.Class cls)
cls
- The class to match.public java.lang.Class getMatchClass()
public void setMatchClass(java.lang.Class cls)
cls
- The node class to match.public boolean accept(Node node)
accept
在接口中 NodeFilter
node
- The node to check.true
if the node is the right class,
false
otherwise.