java.io.Serializable
, java.lang.Cloneable
, NodeFilter
public class NodeClassFilter extends java.lang.Object implements NodeFilter
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.Class |
mClass |
The class to match.
|
Constructor | 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 | 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 NodeFilter
node
- The node to check.true
if the node is the right class,
false
otherwise.HTML Parser is an open source library released under LGPL.