HTML Parser Home Page

org.htmlparser.filters
Class NodeClassFilter

java.lang.Object
  extended byorg.htmlparser.filters.NodeClassFilter
All Implemented Interfaces:
NodeFilter

public class NodeClassFilter
extends Object
implements NodeFilter

This class accepts all tags of a given class.


Field Summary
protected  Class mClass
          The class to match.
 
Constructor Summary
NodeClassFilter(Class cls)
          Creates a new instance of NodeClassFilter that accepts tags of the given class.
 
Method Summary
 boolean accept(Node node)
          Accept nodes that are assignable from the class provided in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mClass

protected Class mClass
The class to match.

Constructor Detail

NodeClassFilter

public NodeClassFilter(Class cls)
Creates a new instance of NodeClassFilter that accepts tags of the given class.

Parameters:
cls - The cls to match.
Method Detail

accept

public boolean accept(Node node)
Accept nodes that are assignable from the class provided in the constructor.

Specified by:
accept in interface NodeFilter
Parameters:
node - The node to check.
Returns:
true if the node is to be kept, false if it is to be discarded.

© 2004 Somik Raha
Mar 14, 2004

HTML Parser is an open source library released under LGPL.
SourceForge.net