Class VersionIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.VersionIteratorAdapter
-
- All Implemented Interfaces:
Iterator
,RangeIterator
,VersionIterator
public class VersionIteratorAdapter extends RangeIteratorDecorator implements VersionIterator
-
-
Field Summary
Fields Modifier and Type Field Description static VersionIterator
EMPTY
Static instance of an emptyVersionIterator
.
-
Constructor Summary
Constructors Constructor Description VersionIteratorAdapter(Collection collection)
Creates an iterator for the given collection.VersionIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator
.VersionIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
nextVersion()
Returns the next version.-
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 VersionIterator EMPTY
Static instance of an emptyVersionIterator
.
-
-
Constructor Detail
-
VersionIteratorAdapter
public VersionIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator
.- Parameters:
iterator
- iterator ofVersion
s
-
VersionIteratorAdapter
public VersionIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator
.- Parameters:
iterator
- iterator ofVersion
s
-
VersionIteratorAdapter
public VersionIteratorAdapter(Collection collection)
Creates an iterator for the given collection.- Parameters:
collection
- collection ofVersion
s
-
-
Method Detail
-
nextVersion
public Version nextVersion()
Returns the next version.- Specified by:
nextVersion
in interfaceVersionIterator
- Returns:
- next version
- Throws:
NoSuchElementException
- if there is no next version
-
-