KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > htmlparser > NodeFilter


1 // HTMLParser Library $Name: v1_5_20050313 $ - A java-based parser for HTML
2
// http://sourceforge.org/projects/htmlparser
3
// Copyright (C) 2003 Derrick Oswald
4
//
5
// Revision Control Information
6
//
7
// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/NodeFilter.java,v $
8
// $Author: derrickoswald $
9
// $Date: 2005/02/13 20:36:01 $
10
// $Revision: 1.2 $
11
//
12
// This library is free software; you can redistribute it and/or
13
// modify it under the terms of the GNU Lesser General Public
14
// License as published by the Free Software Foundation; either
15
// version 2.1 of the License, or (at your option) any later version.
16
//
17
// This library is distributed in the hope that it will be useful,
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
// Lesser General Public License for more details.
21
//
22
// You should have received a copy of the GNU Lesser General Public
23
// License along with this library; if not, write to the Free Software
24
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
//
26

27 package org.htmlparser;
28
29 import java.io.Serializable JavaDoc;
30
31 /**
32  * Implement this interface to select particular nodes.
33  */

34 public interface NodeFilter
35     extends
36         Serializable JavaDoc,
37         Cloneable JavaDoc
38 {
39     /**
40      * Predicate to determine whether or not to keep the given node.
41      * The behaviour based on this outcome is determined by the context
42      * in which it is called. It may lead to the node being added to a list
43      * or printed out. See the calling routine for details.
44      * @return <code>true</code> if the node is to be kept, <code>false</code>
45      * if it is to be discarded.
46      */

47     boolean accept (Node node);
48 }
49
Popular Tags