org.jdom.filter
Class ElementFilter
java.lang.Object
org.jdom.filter.ElementFilter
- Filter
public class ElementFilter
extends java.lang.Object
The ElementFilter
when applied to a FilterList
will only allow Elements
to be visible.
Version:
- Jools Enticknap
- Bradley S. Huffman
boolean | canAdd(Object obj) -
Only allow the adding of Element objects.
|
boolean | canRemove(Object obj) -
Check to see if the object can be removed from the list.
|
boolean | equals(Object obj) -
Returns true if object is instance of ElementFilter and has
the same parent Element, name, and namespace as this filter.
|
boolean | matches(Object obj) -
Check to see if the object matches a predefined set of rules.
|
name
protected String name
The element name
namespace
protected Namespace namespace
The element namespace
ElementFilter
public ElementFilter()
Filter out the Elements.
ElementFilter
public ElementFilter(String name)
Filter out the Elements with the supplied name in any Namespace.
name
- The name of the Element.
ElementFilter
public ElementFilter(String name,
Namespace namespace)
Filter out the Elements with the supplied name and Namespace.
name
- The name of the Element.namespace
- The namespace the Element lives in.
ElementFilter
public ElementFilter(Namespace namespace)
Filter out the Elements with the supplied Namespace.
namespace
- The namespace the Element lives in.
canAdd
public boolean canAdd(Object obj)
Only allow the adding of Element objects.
- canAdd in interface Filter
obj
- The object to verify.
true
if the object can be added.
canRemove
public boolean canRemove(Object obj)
Check to see if the object can be removed from the list.
- canRemove in interface Filter
obj
- The object to verify.
true
if the object can be removed.
equals
public boolean equals(Object obj)
Returns true if object is instance of ElementFilter and has
the same parent Element, name, and namespace as this filter.
true
if the Filters are equal
matches
public boolean matches(Object obj)
Check to see if the object matches a predefined set of rules.
- matches in interface Filter
obj
- The object to verify.
true
if the objected matched a predfined
set of rules.
Copyright B) 2002 Jason Hunter, Brett McLaughlin. All Rights Reserved.