public interface RangeIterator<E>
extends java.util.Iterator<E>
Iterator<E>
with the skip
, getSize
and getPosition
methods.Modifier and Type | Method and Description |
---|---|
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.
|
void skip(long skipNum)
skipNum
- the non-negative number of elements to skipjava.util.NoSuchElementException
- if skipped past the last element in the iterator.long getSize()
long getPosition()
next
call.
Note that this method does not check if there is a next element, i.e. an empty iterator will always return 0.
Copyright © 2010 - 2020 Adobe. All Rights Reserved