Package it.unimi.dsi.big.webgraph
Interface LazyIntIterator
-
public interface LazyIntIteratorA lazy iterator over the integers.An instance of this class represent a (skippable) iterator over the integers. The iterator is exhausted when an implementation-dependent special marker is returned. This fully lazy architecture halves the number of method calls w.r.t. Java's eager iterators.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intnextInt()The next integer returned by this iterator, or the special marker if this iterator is exhausted.intskip(int n)Skips a given number of elements.
-
-
-
Method Detail
-
nextInt
int nextInt()
The next integer returned by this iterator, or the special marker if this iterator is exhausted.- Returns:
- next integer returned by this iterator, or the special marker if this iterator is exhausted.
-
skip
int skip(int n)
Skips a given number of elements.- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped (which might
be less than
nif this iterator is exhausted).
-
-