Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.4)

E13801-01


oracle.ocs.jcr
Interface OracleRangeIterator

All Superinterfaces:
java.util.Iterator, javax.jcr.RangeIterator

public interface OracleRangeIterator
extends javax.jcr.RangeIterator

Extends Iterator with the skip, getSize and getPosition methods. The base interface of all type-specific iterators in the javax.jcr and its subpackages.


Method Summary
 long getPosition()
          Returns the current position within the iterator.
 long getSize()
          Returns the number of elements in the iterator.
 void skip(long skipNum)
          Skip a number of elements in the iterator.

 

Methods inherited from interface java.util.Iterator
hasNext, next, remove

 

Method Detail

skip

void skip(long skipNum)
Skip a number of elements in the iterator.
Specified by:
skip in interface javax.jcr.RangeIterator
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 number of elements in the iterator. If this information is unavailable, returns -1.
Specified by:
getSize in interface javax.jcr.RangeIterator
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 subsequent next call. <p/> Note that this method does not check if there is a next element, i.e. an empty iterator will always return 0.
Specified by:
getPosition in interface javax.jcr.RangeIterator
Returns:
a long

Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.4)

E13801-01


Copyright © 2008, Oracle. All rights reserved.