Package org.jdom.filter2
Class ElementFilter
- java.lang.Object
-
- org.jdom.filter2.AbstractFilter<Element>
-
- org.jdom.filter2.ElementFilter
-
- All Implemented Interfaces:
Serializable
,Filter<Element>
public class ElementFilter extends AbstractFilter<Element>
A Filter that only matchesElement
objects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).Element
filter(Object content)
Check to see if the object matches a predefined set of rules.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
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(Namespace namespace)
Select only the Elements with the supplied Namespace.- Parameters:
namespace
- The namespace the Element lives in.
-
-
Method Detail
-
filter
public Element filter(Object content)
Check to see if the object matches a predefined set of rules.- Parameters:
content
- The object to verify.- Returns:
true
if the objected matched a predfined set of rules.
-
equals
public boolean equals(Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).
-
-