|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.webgraph.MergedIntIterator
public class MergedIntIterator
An iterator returning the union of the integers returned by two IntIterator
s.
The two iterators must return integers in an increasing fashion; the resulting
MergedIntIterator
will do the same. Duplicates will be eliminated.
Constructor Summary | |
---|---|
MergedIntIterator(LazyIntIterator it0,
LazyIntIterator it1)
Creates a new merged iterator by merging two given iterators; the resulting iterator will not emit more than n integers. |
Method Summary | |
---|---|
int |
nextInt()
The next integer returned by this iterator, or the special marker if this iterator is exhausted. |
int |
skip(int s)
Skips a given number of elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MergedIntIterator(LazyIntIterator it0, LazyIntIterator it1)
n
integers.
it0
- the first (monotonically nondecreasing) component iterator.it1
- the second (monotonically nondecreasing) component iterator.Method Detail |
---|
public int nextInt()
LazyIntIterator
nextInt
in interface LazyIntIterator
public int skip(int s)
LazyIntIterator
skip
in interface LazyIntIterator
s
- the number of elements to skip.
n
if this iterator is exhausted).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |