Class EventListenerIteratorAdapter

  • All Implemented Interfaces:
    java.util.Iterator, javax.jcr.observation.EventListenerIterator, javax.jcr.RangeIterator

    public class EventListenerIteratorAdapter
    extends RangeIteratorDecorator
    implements javax.jcr.observation.EventListenerIterator
    Adapter class for turning RangeIterators or Iterators into EventListenerIterators.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static javax.jcr.observation.EventListenerIterator EMPTY
      Static instance of an empty EventListenerIterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jcr.observation.EventListener nextEventListener()
      Returns the next event listener.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
      • Methods inherited from interface javax.jcr.RangeIterator

        getPosition, getSize, skip
    • Field Detail

      • EMPTY

        public static final javax.jcr.observation.EventListenerIterator EMPTY
        Static instance of an empty EventListenerIterator.
    • Constructor Detail

      • EventListenerIteratorAdapter

        public EventListenerIteratorAdapter​(javax.jcr.RangeIterator iterator)
        Creates an adapter for the given RangeIterator.
        Parameters:
        iterator - iterator of EventListeners
      • EventListenerIteratorAdapter

        public EventListenerIteratorAdapter​(java.util.Iterator iterator)
        Creates an adapter for the given Iterator.
        Parameters:
        iterator - iterator of EventListeners
      • EventListenerIteratorAdapter

        public EventListenerIteratorAdapter​(java.util.Collection collection)
        Creates an iterator for the given collection.
        Parameters:
        collection - collection of EventListeners
    • Method Detail

      • nextEventListener

        public javax.jcr.observation.EventListener nextEventListener()
        Returns the next event listener.
        Specified by:
        nextEventListener in interface javax.jcr.observation.EventListenerIterator
        Returns:
        next event listener
        Throws:
        java.util.NoSuchElementException - if there is no next event listener