Class RowIteratorAdapter

  • All Implemented Interfaces:
    java.util.Iterator, javax.jcr.query.RowIterator, javax.jcr.RangeIterator

    public class RowIteratorAdapter
    extends RangeIteratorDecorator
    implements javax.jcr.query.RowIterator
    Adapter class for turning RangeIterators or Iterators into RowIterators.
    • Field Summary

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

      Constructors 
      Constructor Description
      RowIteratorAdapter​(java.util.Collection collection)
      Creates an iterator for the given collection.
      RowIteratorAdapter​(java.util.Iterator iterator)
      Creates an adapter for the given Iterator.
      RowIteratorAdapter​(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.query.Row nextRow()
      Returns the next row.
      • 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.query.RowIterator EMPTY
        Static instance of an empty RowIterator.
    • Constructor Detail

      • RowIteratorAdapter

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

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

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

      • nextRow

        public javax.jcr.query.Row nextRow()
        Returns the next row.
        Specified by:
        nextRow in interface javax.jcr.query.RowIterator
        Returns:
        next row
        Throws:
        java.util.NoSuchElementException - if there is no next row