Class RowIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.RowIteratorAdapter
-
- All Implemented Interfaces:
Iterator,RowIterator,RangeIterator
public class RowIteratorAdapter extends RangeIteratorDecorator implements RowIterator
-
-
Field Summary
Fields Modifier and Type Field Description static RowIteratorEMPTYStatic instance of an emptyRowIterator.
-
Constructor Summary
Constructors Constructor Description RowIteratorAdapter(Collection collection)Creates an iterator for the given collection.RowIteratorAdapter(Iterator iterator)Creates an adapter for the givenIterator.RowIteratorAdapter(RangeIterator iterator)Creates an adapter for the givenRangeIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RownextRow()Returns the next row.-
Methods inherited from class org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
getPosition, getSize, hasNext, next, remove, skip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, 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 RowIterator EMPTY
Static instance of an emptyRowIterator.
-
-
Constructor Detail
-
RowIteratorAdapter
public RowIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator.- Parameters:
iterator- iterator ofRows
-
RowIteratorAdapter
public RowIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator.- Parameters:
iterator- iterator ofRows
-
RowIteratorAdapter
public RowIteratorAdapter(Collection collection)
Creates an iterator for the given collection.- Parameters:
collection- collection ofRows
-
-
Method Detail
-
nextRow
public Row nextRow()
Returns the next row.- Specified by:
nextRowin interfaceRowIterator- Returns:
- next row
- Throws:
NoSuchElementException- if there is no next row
-
-