Class VersionIteratorAdapter
java.lang.Object
org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
org.apache.jackrabbit.commons.iterator.VersionIteratorAdapter
- All Implemented Interfaces:
Iterator,RangeIterator,VersionIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VersionIteratorStatic instance of an emptyVersionIterator. -
Constructor Summary
ConstructorsConstructorDescriptionVersionIteratorAdapter(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
Methods inherited from class org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
getPosition, getSize, hasNext, next, remove, skipMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, removeMethods inherited from interface javax.jcr.RangeIterator
getPosition, getSize, skip
-
Field Details
-
EMPTY
Static instance of an emptyVersionIterator.
-
-
Constructor Details
-
VersionIteratorAdapter
Creates an adapter for the givenRangeIterator.- Parameters:
iterator- iterator ofVersions
-
VersionIteratorAdapter
Creates an adapter for the givenIterator.- Parameters:
iterator- iterator ofVersions
-
VersionIteratorAdapter
Creates an iterator for the given collection.- Parameters:
collection- collection ofVersions
-
-
Method Details
-
nextVersion
Returns the next version.- Specified by:
nextVersionin interfaceVersionIterator- Returns:
- next version
- Throws:
NoSuchElementException- if there is no next version
-