Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdom.filter
Class ElementFilter

    java.lang.Object
      org.jdom.filter.AbstractFilter
          org.jdom.filter.ElementFilter

All Implemented Interfaces:
  java.io.Serializable, Filter

    public class ElementFilter

extends AbstractFilter

A Filter that only matches `Element` objects.

See Also:
  Serialized Form

Field Summary
`private static java.lang.String` | `CVS_ID`
`private java.lang.String` | `name` The element name
`private Namespace` | `namespace` The element namespace

Constructor Summary
`ElementFilter()` Select only the Elements.
`ElementFilter(Namespace namespace)` Select only the Elements with the supplied Namespace.
`ElementFilter(java.lang.String name)` Select only the Elements with the supplied name in any Namespace.
`ElementFilter(java.lang.String name, Namespace namespace)` Select only the Elements with the supplied name and Namespace.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).
`int` | `hashCode()`
`boolean` | `matches(java.lang.Object obj)` Check to see if the object matches a predefined set of rules.
`private void` | `readObject(java.io.ObjectInputStream in)`
`private void` | `writeObject(java.io.ObjectOutputStream out)`

Methods inherited from class org.jdom.filter.AbstractFilter
`and, negate, or`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CVS_ID

    private static final java.lang.String CVS_ID

See Also:
  Constant Field Values

### name

    private java.lang.String name

  The element name

### namespace

    private transient Namespace namespace

  The element namespace

Constructor Detail

### ElementFilter

    public ElementFilter()

  Select only the Elements.

### ElementFilter

    public ElementFilter(java.lang.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.

### ElementFilter

    public ElementFilter(java.lang.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.

Method Detail

### matches

    public boolean matches(java.lang.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.

### equals

    public boolean equals(java.lang.Object obj)

  Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object to compare against
  Returns:
    whether the two filters are equal

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### writeObject

    private void writeObject(java.io.ObjectOutputStream out)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException

  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD