Package it.unimi.dsi.big.webgraph
Interface LazyLongIterator
-
- All Known Subinterfaces:
ArcLabelledNodeIterator.LabelledArcIterator
,LazyLongSkippableIterator
- All Known Implementing Classes:
AbstractLazyLongIterator
,BitStreamArcLabelledImmutableGraph.BitStreamLabelledArcIterator
,EFGraph.EliasFanoSuccessorReader
,LongIntervalSequenceIterator
,MaskedLongIterator
,MergedLongIterator
public interface LazyLongIterator
A lazy iterator over longs.An instance of this class represent a (skippable) iterator over longs. 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 long
nextLong()
The next long returned by this iterator, or the special marker if this iterator is exhausted.long
skip(long n)
Skips a given number of elements.
-
-
-
Method Detail
-
nextLong
long nextLong()
The next long returned by this iterator, or the special marker if this iterator is exhausted.- Returns:
- next long returned by this iterator, or the special marker if this iterator is exhausted.
-
skip
long skip(long 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
n
if this iterator is exhausted).
-
-