Class RangeIteratorDecorator
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- All Implemented Interfaces:
Iterator,RangeIterator
- Direct Known Subclasses:
AccessControlPolicyIteratorAdapter,EventIteratorAdapter,EventListenerIteratorAdapter,NodeIteratorAdapter,NodeTypeIteratorAdapter,PrincipalIteratorAdapter,PropertyIteratorAdapter,RowIteratorAdapter,VersionIteratorAdapter
public class RangeIteratorDecorator extends Object implements RangeIterator
Base class for decoratingRangeIterators.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRangeIteratorDecorator(RangeIterator iterator)Creates a decorated iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPosition()Delegated to the underlying iterator.longgetSize()Delegated to the underlying iterator.booleanhasNext()Delegated to the underlying iterator.Objectnext()Delegated to the underlying iterator.voidremove()Delegated to the underlying iterator.voidskip(long n)Delegated to the underlying iterator.-
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
-
-
-
-
Constructor Detail
-
RangeIteratorDecorator
protected RangeIteratorDecorator(RangeIterator iterator)
Creates a decorated iterator. Protected since this class is only useful when subclassed.- Parameters:
iterator- the iterator to be decorated
-
-
Method Detail
-
getPosition
public long getPosition()
Delegated to the underlying iterator.- Specified by:
getPositionin interfaceRangeIterator- Returns:
- iterator position
-
getSize
public long getSize()
Delegated to the underlying iterator.- Specified by:
getSizein interfaceRangeIterator- Returns:
- iterator size
-
skip
public void skip(long n) throws NoSuchElementExceptionDelegated to the underlying iterator.- Specified by:
skipin interfaceRangeIterator- Parameters:
n- number of elements to skip- Throws:
NoSuchElementException- if skipped past the last element
-
hasNext
public boolean hasNext()
Delegated to the underlying iterator.
-
next
public Object next() throws NoSuchElementException
Delegated to the underlying iterator.- Specified by:
nextin interfaceIterator- Returns:
- next element
- Throws:
NoSuchElementException- if there are no more elements
-
remove
public void remove() throws UnsupportedOperationException, IllegalStateExceptionDelegated to the underlying iterator.- Specified by:
removein interfaceIterator- Throws:
UnsupportedOperationException- if the operation is not supportedIllegalStateException- if there is no element to be removed
-
-