Class VersionIteratorAdapter

  • All Implemented Interfaces:
    java.util.Iterator, javax.jcr.RangeIterator, javax.jcr.version.VersionIterator

    public class VersionIteratorAdapter
    extends RangeIteratorDecorator
    implements javax.jcr.version.VersionIterator
    Adapter class for turning RangeIterators or Iterators into VersionIterators.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static javax.jcr.version.VersionIterator EMPTY
      Static instance of an empty VersionIterator.
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionIteratorAdapter​(java.util.Collection collection)
      Creates an iterator for the given collection.
      VersionIteratorAdapter​(java.util.Iterator iterator)
      Creates an adapter for the given Iterator.
      VersionIteratorAdapter​(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.version.Version nextVersion()
      Returns the next version.
      • 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.version.VersionIterator EMPTY
        Static instance of an empty VersionIterator.
    • Constructor Detail

      • VersionIteratorAdapter

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

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

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

      • nextVersion

        public javax.jcr.version.Version nextVersion()
        Returns the next version.
        Specified by:
        nextVersion in interface javax.jcr.version.VersionIterator
        Returns:
        next version
        Throws:
        java.util.NoSuchElementException - if there is no next version