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:
- Iterator, javax.jcr.RangeIterator, javax.jcr.version.VersionIterator
public class VersionIteratorAdapter
- extends RangeIteratorDecorator
- implements javax.jcr.version.VersionIterator
Adapter class for turning RangeIterator
s or Iterator
s
into VersionIterator
s.
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 |
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 Version
s
VersionIteratorAdapter
public VersionIteratorAdapter(Iterator iterator)
- Creates an adapter for the given
Iterator
.
- Parameters:
iterator
- iterator of Version
s
VersionIteratorAdapter
public VersionIteratorAdapter(Collection collection)
- Creates an iterator for the given collection.
- Parameters:
collection
- collection of Version
s
nextVersion
public javax.jcr.version.Version nextVersion()
- Returns the next version.
- Specified by:
nextVersion
in interface javax.jcr.version.VersionIterator
- Returns:
- next version
- Throws:
NoSuchElementException
- if there is no next version
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.