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 decoratingRangeIterator
s.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RangeIteratorDecorator(RangeIterator iterator)
Creates a decorated iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getPosition()
Delegated to the underlying iterator.long
getSize()
Delegated to the underlying iterator.boolean
hasNext()
Delegated to the underlying iterator.Object
next()
Delegated to the underlying iterator.void
remove()
Delegated to the underlying iterator.void
skip(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:
getPosition
in interfaceRangeIterator
- Returns:
- iterator position
-
getSize
public long getSize()
Delegated to the underlying iterator.- Specified by:
getSize
in interfaceRangeIterator
- Returns:
- iterator size
-
skip
public void skip(long n) throws NoSuchElementException
Delegated to the underlying iterator.- Specified by:
skip
in 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:
next
in interfaceIterator
- Returns:
- next element
- Throws:
NoSuchElementException
- if there are no more elements
-
remove
public void remove() throws UnsupportedOperationException, IllegalStateException
Delegated to the underlying iterator.- Specified by:
remove
in interfaceIterator
- Throws:
UnsupportedOperationException
- if the operation is not supportedIllegalStateException
- if there is no element to be removed
-
-