JDOM
2.0.5

org.jdom2.filter
Class AttributeFilter

java.lang.Object
  extended by org.jdom2.filter.AbstractFilter<Attribute>
      extended by org.jdom2.filter.AttributeFilter
All Implemented Interfaces:
java.io.Serializable, Filter<Attribute>

public class AttributeFilter
extends AbstractFilter<Attribute>

A Filter that only matches Attribute objects.

Author:
Rolf Lear
See Also:
Serialized Form

Constructor Summary
AttributeFilter()
          Select only the Elements.
AttributeFilter(Namespace namespace)
          Select only the Attributes with the supplied Namespace.
AttributeFilter(java.lang.String name)
          Select only the Elements with the supplied name in any Namespace.
AttributeFilter(java.lang.String name, Namespace namespace)
          Select only the Attributes 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).
 Attribute filter(java.lang.Object content)
          Check to see if the Content matches a predefined set of rules.
 int hashCode()
           
 
Methods inherited from class org.jdom2.filter.AbstractFilter
and, filter, matches, negate, or, refine
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeFilter

public AttributeFilter()
Select only the Elements.


AttributeFilter

public AttributeFilter(java.lang.String name)
Select only the Elements with the supplied name in any Namespace.

Parameters:
name - The name of the Element.

AttributeFilter

public AttributeFilter(Namespace namespace)
Select only the Attributes with the supplied Namespace.

Parameters:
namespace - The namespace the Attribute lives in.

AttributeFilter

public AttributeFilter(java.lang.String name,
                       Namespace namespace)
Select only the Attributes with the supplied name and Namespace.

Parameters:
name - The name of the Attribute.
namespace - The namespace the Attribute lives in.
Method Detail

filter

public Attribute filter(java.lang.Object content)
Check to see if the Content matches a predefined set of rules.

Parameters:
content - The Content 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

JDOM
2.0.5

Copyright � 2013 Jason Hunter, Brett McLaughlin. All Rights Reserved.