HTML Parser Home Page

org.htmlparser.filters
Class AndFilter

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

public class AndFilter
extends Object
implements NodeFilter

This class accepts all nodes matching both filters (AND operation).


Field Summary
protected  NodeFilter mLeft
          The left hand side.
protected  NodeFilter mRight
          The right hand side.
 
Constructor Summary
AndFilter(NodeFilter left, NodeFilter right)
          Creates a new instance of AndFilter that accepts nodes acceptable to both filters.
 
Method Summary
 boolean accept(Node node)
          Accept nodes that are acceptable to both filters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLeft

protected NodeFilter mLeft
The left hand side.


mRight

protected NodeFilter mRight
The right hand side.

Constructor Detail

AndFilter

public AndFilter(NodeFilter left,
                 NodeFilter right)
Creates a new instance of AndFilter that accepts nodes acceptable to both filters.

Parameters:
left - One filter.
right - The other filter.
Method Detail

accept

public boolean accept(Node node)
Accept nodes that are acceptable to both filters.

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