public class NodeClassFilter extends java.lang.Object implements NodeFilter
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class |
mClass
The class to match.
|
| Constructor and Description |
|---|
NodeClassFilter()
Creates a NodeClassFilter that accepts Html tags.
|
NodeClassFilter(java.lang.Class cls)
Creates a NodeClassFilter that accepts tags of the given class.
|
| Modifier and Type | Method and Description |
|---|---|
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 in interface NodeFilternode - The node to check.true if the node is the right class,
false otherwise.HTML Parser is an open source library released under LGPL.