001/* 002 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 003 * 004 * This software is open source. 005 * See the bottom of this file for the licence. 006 * 007 * $Id: NodeFilter.java,v 1.2 2001/02/26 12:44:40 jstrachan Exp $ 008 */ 009 010package org.dom4j; 011 012/** <p><code>NodeFilter</code> defines the behavior for 013 * a filter or predicate which acts on a DOM4J Node. 014 * Instances can be generated from an {@link DocumentFactory}.</p> 015 * 016 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a> 017 * @version $Revision: 1.2 $ 018 */ 019public interface NodeFilter { 020 021 /** <p><code>matches</code> returns true if the given node matches 022 * the filter condition.</p> 023 * 024 * @return true if this filter matches the given node 025 */ 026 public boolean matches(Node node); 027 028} 029 030 031 032 033/* 034 * Redistribution and use of this software and associated documentation 035 * ("Software"), with or without modification, are permitted provided 036 * that the following conditions are met: 037 * 038 * 1. Redistributions of source code must retain copyright 039 * statements and notices. Redistributions must also contain a 040 * copy of this document. 041 * 042 * 2. Redistributions in binary form must reproduce the 043 * above copyright notice, this list of conditions and the 044 * following disclaimer in the documentation and/or other 045 * materials provided with the distribution. 046 * 047 * 3. The name "DOM4J" must not be used to endorse or promote 048 * products derived from this Software without prior written 049 * permission of MetaStuff, Ltd. For written permission, 050 * please contact dom4j-info@metastuff.com. 051 * 052 * 4. Products derived from this Software may not be called "DOM4J" 053 * nor may "DOM4J" appear in their names without prior written 054 * permission of MetaStuff, Ltd. DOM4J is a registered 055 * trademark of MetaStuff, Ltd. 056 * 057 * 5. Due credit should be given to the DOM4J Project 058 * (http://dom4j.org/). 059 * 060 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS 061 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT 062 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 063 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 064 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 065 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 066 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 067 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 068 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 069 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 070 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 071 * OF THE POSSIBILITY OF SUCH DAMAGE. 072 * 073 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 074 * 075 * $Id: NodeFilter.java,v 1.2 2001/02/26 12:44:40 jstrachan Exp $ 076 */