it.unimi.dsi.webgraph
Class AbstractLazyIntIterator
java.lang.Object
it.unimi.dsi.webgraph.AbstractLazyIntIterator
- All Implemented Interfaces:
- LazyIntIterator
- Direct Known Subclasses:
- BitStreamArcLabelledImmutableGraph.BitStreamLabelledArcIterator
public abstract class AbstractLazyIntIterator
- extends Object
- implements LazyIntIterator
An abstract implementation of a lazy integer iterator, implementing skip(int)
by repeated calls to nextInt()
.
Method Summary |
int |
skip(int n)
Skips a given number of elements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLazyIntIterator
public AbstractLazyIntIterator()
skip
public int skip(int n)
- Description copied from interface:
LazyIntIterator
- Skips a given number of elements.
- Specified by:
skip
in interface LazyIntIterator
- Parameters:
n
- the number of elements to skip.
- Returns:
- the number of elements actually skipped (which might
be less than
n
if this iterator is exhausted).