All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.jdom.filter.ElementFilter

java.lang.Object
   |
   +----org.jdom.filter.ElementFilter

public class ElementFilter
extends Object
implements Filter

The ElementFilter when applied to a FilterList will only allow Elements to be visible.

Version:
$Revision: 1.2 $, $Date: 2002/03/13 06:25:33 $
Author:
Jools Enticknap, Bradley S. Huffman

Variable Index

 o name
The element name
 o namespace
The element namespace

Constructor Index

 o ElementFilter()

Filter out the Elements.

 o ElementFilter(Namespace)

Filter out the Elements with the supplied Namespace.

 o ElementFilter(String)

Filter out the Elements with the supplied name in any Namespace.

 o ElementFilter(String, Namespace)

Filter out the Elements with the supplied name and Namespace.

Method Index

 o canAdd(Object)

Only allow the adding of Element objects.

 o canRemove(Object)

Check to see if the object can be removed from the list.

 o equals(Object)

Returns true if object is instance of ElementFilter and has the same parent Element, name, and namespace as this filter.

 o matches(Object)

Check to see if the object matches a predefined set of rules.

Variables

 o name
 protected String name
The element name

 o namespace
 protected Namespace namespace
The element namespace

Constructors

 o ElementFilter
 public ElementFilter()

Filter out the Elements.

 o ElementFilter
 public ElementFilter(String name)

Filter out the Elements with the supplied name in any Namespace.

Parameters:
name - The name of the Element.
 o ElementFilter
 public ElementFilter(Namespace namespace)

Filter out the Elements with the supplied Namespace.

Parameters:
namespace - The namespace the Element lives in.
 o ElementFilter
 public ElementFilter(String name,
                      Namespace namespace)

Filter out the Elements with the supplied name and Namespace.

Parameters:
name - The name of the Element.
namespace - The namespace the Element lives in.

Methods

 o canAdd
 public boolean canAdd(Object obj)

Only allow the adding of Element objects.

Parameters:
obj - The object to verify.
Returns:
true if the object can be added.
Throws: IllegalAddException
if the object can be added.
 o canRemove
 public boolean canRemove(Object obj)

Check to see if the object can be removed from the list.

Parameters:
obj - The object to verify.
Returns:
true if the object can be removed.
 o matches
 public boolean matches(Object obj)

Check to see if the object matches a predefined set of rules.

Parameters:
obj - The object to verify.
Returns:
true if the objected matched a predfined set of rules.
 o 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.

Returns:
true if the Filters are equal
Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index