com.bea.xml.stream.filters
Class NameFilter

java.lang.Object
  extended by com.bea.xml.stream.filters.NameFilter
All Implemented Interfaces:
javax.xml.stream.EventFilter, javax.xml.stream.StreamFilter

public class NameFilter
extends java.lang.Object
implements javax.xml.stream.EventFilter, javax.xml.stream.StreamFilter


Constructor Summary
NameFilter(javax.xml.namespace.QName name)
           
 
Method Summary
 boolean accept(javax.xml.stream.events.XMLEvent e)
          Tests whether this event is part of this stream.
 boolean accept(javax.xml.stream.XMLStreamReader r)
          Tests whether the current state is part of this stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameFilter

public NameFilter(javax.xml.namespace.QName name)
Method Detail

accept

public boolean accept(javax.xml.stream.events.XMLEvent e)
Description copied from interface: javax.xml.stream.EventFilter
Tests whether this event is part of this stream. This method will return true if this filter accepts this event and false otherwise.

Specified by:
accept in interface javax.xml.stream.EventFilter
Parameters:
e - the event to test
Returns:
true if this filter accepts this event, false otherwise

accept

public boolean accept(javax.xml.stream.XMLStreamReader r)
Description copied from interface: javax.xml.stream.StreamFilter
Tests whether the current state is part of this stream. This method will return true if this filter accepts this event and false otherwise. The method should not change the state of the reader when accepting a state.

Specified by:
accept in interface javax.xml.stream.StreamFilter
Parameters:
r - the event to test
Returns:
true if this filter accepts this event, false otherwise