Class VersionIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.VersionIteratorAdapter
-
- All Implemented Interfaces:
java.util.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(java.util.Collection collection)
Creates an iterator for the given collection.VersionIteratorAdapter(java.util.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.Iterator iterator)
Creates an adapter for the givenIterator
.- Parameters:
iterator
- iterator ofVersion
s
-
VersionIteratorAdapter
public VersionIteratorAdapter(java.util.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:
java.util.NoSuchElementException
- if there is no next version
-
-