org.apache.jackrabbit.core.version
Class VersionIteratorImpl

java.lang.Object
  extended byorg.apache.jackrabbit.core.version.VersionIteratorImpl
All Implemented Interfaces:
Iterator, RangeIterator, VersionIterator

public class VersionIteratorImpl
extends Object
implements VersionIterator

This Class implements a VersionIterator that iterates over a version graph following the successor nodes. When this iterator is created, it gathers the id's of the versions and returns them when iterating. please note, that a version can be deleted while traversing this iterator and the 'nextVesion' would produce a ConcurrentModificationException.


Constructor Summary
VersionIteratorImpl(Session session, InternalVersion rootVersion)
          Creates a new VersionIterator that iterates over the version tree, starting the root node.
 
Method Summary
 long getPosition()
          
 long getSize()
          
 boolean hasNext()
          
 Object next()
          
 Version nextVersion()
          
 void remove()
          
 void skip(long skipNum)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionIteratorImpl

public VersionIteratorImpl(Session session,
                           InternalVersion rootVersion)
Creates a new VersionIterator that iterates over the version tree, starting the root node.

Parameters:
rootVersion -
Method Detail

nextVersion

public Version nextVersion()

Specified by:
nextVersion in interface VersionIterator

skip

public void skip(long skipNum)

Specified by:
skip in interface RangeIterator

getSize

public long getSize()

Specified by:
getSize in interface RangeIterator

getPosition

public long getPosition()

Specified by:
getPosition in interface RangeIterator

remove

public void remove()
            throws UnsupportedOperationException

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - since this operation is not supported

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator

next

public Object next()

Specified by:
next in interface Iterator


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.