| javax.jcr.RangeIterator
RangeIterator | public interface RangeIterator extends Iterator(Code) | | 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 | |
public long | getNumberRemaining() Returns the number of subsequent next calls that can be
successfully performed on this iterator. | public long | getPosition() Returns the current position within the iterator. | public long | getSize() Returns the total number of of items available through this iterator.
For example, for some node N , N.getNodes().getSize()
returns the number of child nodes of N visible through the
current Session . | public void | skip(long skipNum) Skip a number of elements in the iterator. |
getNumberRemaining | public long getNumberRemaining()(Code) | | Returns the number of subsequent next calls that can be
successfully performed on this iterator. This is the number of items
still available through this iterator. For example, for some node
N , N.getNodes().getSize() returns the number
of child nodes of N visible through the current
Session that have not yet been returned. In some
implementations precise information about the number of remaining
elements may not be available. In such cases this method should return
a reasonable upper bound on the number if such an estimate is available
and -1 if it is not.
a long since: JCR 2.0 |
getPosition | public long getPosition()(Code) | | 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.
Note that this method does not check if there is a next element,
i.e. an empty iterator will always return 0.
a long |
getSize | public long getSize()(Code) | | Returns the total number of of items available through this iterator.
For example, for some node N , N.getNodes().getSize()
returns the number of child nodes of N visible through the
current Session . 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 use
RangeIterator.getNumberRemaining to get an estimate on the
number of elements.
a long |
skip | public void skip(long skipNum)(Code) | | 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. |
|
|