Package javax.jcr
Interface RangeIterator
- 
- All Superinterfaces:
 java.util.Iterator
- All Known Subinterfaces:
 AccessControlPolicyIterator,EventIterator,EventJournal,EventListenerIterator,NodeIterator,NodeTypeIterator,PrincipalIterator,PropertyIterator,RowIterator,VersionIterator
- All Known Implementing Classes:
 AccessControlPolicyIteratorAdapter,EventIteratorAdapter,EventListenerIteratorAdapter,FilteredRangeIterator,FilteringNodeIterator,FrozenNodeIteratorAdapter,NodeIteratorAdapter,NodeTypeIteratorAdapter,PrincipalIteratorAdapter,PropertyIteratorAdapter,RangeIteratorAdapter,RangeIteratorDecorator,RowIteratorAdapter,VersionIteratorAdapter
public interface RangeIterator extends java.util.IteratorExtendsIteratorwith theskip,getSizeandgetPositionmethods. The base interface of all type-specific iterators in thejavax.jcrand its sub packages. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetPosition()Returns the current position within the iterator.longgetSize()Returns the total number of of items available through this iterator.voidskip(long skipNum)Skip a number of elements in the iterator. 
 - 
 
- 
- 
Method Detail
- 
skip
void skip(long skipNum)
Skip a number of elements in the iterator.- Parameters:
 skipNum- the non-negative number of elements to skip- Throws:
 java.util.NoSuchElementException- if skipped past the last element in the iterator.
 
- 
getSize
long getSize()
Returns the total number of of items available through this iterator. For example, for some nodeN,N.getNodes().getSize()returns the number of child nodes ofNvisible through the currentSession. In some implementations precise information about the number of elements may not be available. In such cases this method must return -1. API clients will then be able to useRangeIterator.getNumberRemainingto get an estimate on the number of elements.- Returns:
 - a long
 
 
- 
getPosition
long getPosition()
Returns the current position within the iterator. The number returned is the 0-based index of the next element in the iterator, i.e. the one that will be returned on the subsequentnextcall.Note that this method does not check if there is a next element, i.e. an empty iterator will always return 0.
- Returns:
 - a long
 
 
 - 
 
 -