org.jdom.filter

Class ElementFilter

Implemented Interfaces:
Filter, java.io.Serializable

public class ElementFilter
extends AbstractFilter

A Filter that only matches Element objects.
Version:
$Revision: 1.20 $, $Date: 2007/11/10 05:29:00 $
Authors:
Jools Enticknap
Bradley S. Huffman

Constructor Summary

ElementFilter()
Select only the Elements.
ElementFilter(String name)
Select only the Elements with the supplied name in any Namespace.
ElementFilter(String name, Namespace namespace)
Select only the Elements with the supplied name and Namespace.
ElementFilter(Namespace namespace)
Select only the Elements with the supplied Namespace.

Method Summary

boolean
equals(Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).
int
hashCode()
boolean
matches(Object obj)
Check to see if the object matches a predefined set of rules.

Methods inherited from class org.jdom.filter.AbstractFilter

and, negate, or

Constructor Details

ElementFilter

public ElementFilter()
Select only the Elements.

ElementFilter

public ElementFilter(String name)
Select only the Elements with the supplied name in any Namespace.
Parameters:
name - The name of the Element.

ElementFilter

public ElementFilter(String name,
                     Namespace namespace)
Select only the Elements with the supplied name and Namespace.
Parameters:
name - The name of the Element.
namespace - The namespace the Element lives in.

ElementFilter

public ElementFilter(Namespace namespace)
Select only the Elements with the supplied Namespace.
Parameters:
namespace - The namespace the Element lives in.

Method Details

equals

public boolean equals(Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).
Parameters:
obj - the object to compare against
Returns:
whether the two filters are equal

hashCode

public int hashCode()

matches

public boolean matches(Object obj)
Check to see if the object matches a predefined set of rules.
Specified by:
matches in interface Filter
Parameters:
obj - The object to verify.
Returns:
true if the objected matched a predfined set of rules.

Copyright B) 2007 Jason Hunter, Brett McLaughlin. All Rights Reserved.