|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.xml.dom.ElementNameFilter
A node filter that only accepts elements with a specified name.
Constructor Summary | |
ElementNameFilter(List nameList)
Creates a new instance. |
|
ElementNameFilter(Set nameSet)
Creates a new instance. |
|
ElementNameFilter(String elementName)
Creates a new instance that accepts only elements of a single type. |
|
ElementNameFilter(String[] nameArray)
Creates a new instance. |
Method Summary | |
Set |
getNames()
Returns the set of element names accepted by this filter. |
boolean |
matches(Node node)
Tests whether a node is accected by this filter. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ElementNameFilter(Set nameSet)
nameSet
- set of element name strings to accept, format must be
compatible to DOMUtils.name(Element)
public ElementNameFilter(List nameList)
nameList
- array of element name strings to accept, format must be
compatible to DOMUtils.name(Element)
public ElementNameFilter(String[] nameArray)
nameArray
- array of element name strings to accept, format must be
compatible to DOMUtils.name(Element)
public ElementNameFilter(String elementName)
elementName
- Only elements with this name are accepted, format must
be compatible to DOMUtils.name(Element)
Method Detail |
public Set getNames()
public boolean matches(Node node)
Element
and (b)
getNames()
must contain the name of the element as returned by
DOMUtils.name(Element)
.
matches
in interface NodeFilter
node
- the node to test
true
iff this filter matches the given nodepublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |