org.apache.jackrabbit.commons.iterator
Class VersionIteratorAdapter
java.lang.Object
org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
org.apache.jackrabbit.commons.iterator.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 |
static javax.jcr.version.VersionIterator |
EMPTY
Static instance of an empty VersionIterator. |
|
Method Summary |
javax.jcr.version.Version |
nextVersion()
Returns the next version. |
| 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 |
EMPTY
public static final javax.jcr.version.VersionIterator EMPTY
- Static instance of an empty
VersionIterator.
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
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
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.