Class TypeFilter

  • All Implemented Interfaces:
    javax.xml.stream.EventFilter, javax.xml.stream.StreamFilter

    public class TypeFilter
    extends java.lang.Object
    implements javax.xml.stream.EventFilter, javax.xml.stream.StreamFilter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean[] types  
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      void addType​(int type)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • types

        protected boolean[] types
    • Constructor Detail

      • TypeFilter

        public TypeFilter()
    • Method Detail

      • addType

        public void addType​(int type)
      • 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