org.apache.jackrabbit.commons.iterator
Class RowIteratorAdapter

java.lang.Object
  extended by org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
      extended by org.apache.jackrabbit.commons.iterator.RowIteratorAdapter
All Implemented Interfaces:
Iterator, RowIterator, RangeIterator

public class RowIteratorAdapter
extends RangeIteratorDecorator
implements RowIterator

Adapter class for turning RangeIterators or Iterators into RowIterators.


Field Summary
static RowIterator EMPTY
          Static instance of an empty RowIterator.
 
Constructor Summary
RowIteratorAdapter(Collection collection)
          Creates an iterator for the given collection.
RowIteratorAdapter(Iterator iterator)
          Creates an adapter for the given Iterator.
RowIteratorAdapter(RangeIterator iterator)
          Creates an adapter for the given RangeIterator.
 
Method Summary
 Row nextRow()
          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 javax.jcr.RangeIterator
getPosition, getSize, skip
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Field Detail

EMPTY

public static final RowIterator EMPTY
Static instance of an empty RowIterator.

Constructor Detail

RowIteratorAdapter

public RowIteratorAdapter(RangeIterator iterator)
Creates an adapter for the given RangeIterator.

Parameters:
iterator - iterator of Rows

RowIteratorAdapter

public RowIteratorAdapter(Iterator iterator)
Creates an adapter for the given Iterator.

Parameters:
iterator - iterator of Rows

RowIteratorAdapter

public RowIteratorAdapter(Collection collection)
Creates an iterator for the given collection.

Parameters:
collection - collection of Rows
Method Detail

nextRow

public Row nextRow()
Returns the next row.

Specified by:
nextRow in interface RowIterator
Returns:
next row
Throws:
NoSuchElementException - if there is no next row


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.