Package org.jdom.filter2
Class AttributeFilter
- java.lang.Object
-
- org.jdom.filter2.AbstractFilter<Attribute>
-
- org.jdom.filter2.AttributeFilter
-
- All Implemented Interfaces:
Serializable
,Filter<Attribute>
public class AttributeFilter extends AbstractFilter<Attribute>
A Filter that only matchesAttribute
objects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeFilter()
Select only the Elements.AttributeFilter(String name)
Select only the Elements with the supplied name in any Namespace.AttributeFilter(String name, Namespace namespace)
Select only the Attributes with the supplied name and Namespace.AttributeFilter(Namespace namespace)
Select only the Attributes 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).Attribute
filter(Object content)
Check to see if the Content matches a predefined set of rules.int
hashCode()
-
-
-
Constructor Detail
-
AttributeFilter
public AttributeFilter()
Select only the Elements.
-
AttributeFilter
public AttributeFilter(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.
-
-
Method Detail
-
filter
public Attribute filter(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(Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent).
-
-