Class EventIteratorAdapter

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

    public class EventIteratorAdapter
    extends RangeIteratorDecorator
    implements javax.jcr.observation.EventIterator
    Adapter class for turning RangeIterators or Iterators into EventIterators.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventIteratorAdapter​(java.util.Collection collection)
      Creates an iterator for the given collection.
      EventIteratorAdapter​(java.util.Iterator iterator)
      Creates an adapter for the given Iterator.
      EventIteratorAdapter​(javax.jcr.observation.EventIterator iterator)
      Creates an adapter for the given RangeIterator.
      EventIteratorAdapter​(javax.jcr.RangeIterator iterator)
      Creates an adapter for the given RangeIterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jcr.observation.Event nextEvent()
      Returns the next event.
      • 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
    • Constructor Detail

      • EventIteratorAdapter

        public EventIteratorAdapter​(javax.jcr.observation.EventIterator iterator)
        Creates an adapter for the given RangeIterator.
        Parameters:
        iterator - iterator of Events
      • EventIteratorAdapter

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

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

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

      • nextEvent

        public javax.jcr.observation.Event nextEvent()
                                              throws java.util.NoSuchElementException
        Returns the next event.
        Specified by:
        nextEvent in interface javax.jcr.observation.EventIterator
        Returns:
        next event
        Throws:
        java.util.NoSuchElementException - if there is no next event