HTML Parser Home Page

org.htmlparser.filters
Class OrFilter

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

public class OrFilter
extends Object
implements NodeFilter

This class accepts all nodes matching either filter (OR operation).


Field Summary
protected  NodeFilter mLeft
          The left hand side.
protected  NodeFilter mRight
          The right hand side.
 
Constructor Summary
OrFilter(NodeFilter left, NodeFilter right)
          Creates a new instance of OrFilter that accepts nodes acceptable to either filter.
 
Method Summary
 boolean accept(Node node)
          Accept nodes that are acceptable to either filter.
 
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

OrFilter

public OrFilter(NodeFilter left,
                NodeFilter right)
Creates a new instance of OrFilter that accepts nodes acceptable to either filter.

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

accept

public boolean accept(Node node)
Accept nodes that are acceptable to either filter.

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