it.unimi.dsi.webgraph
Class AbstractLazyIntIterator

java.lang.Object
  extended by 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().


Constructor Summary
AbstractLazyIntIterator()
           
 
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
 
Methods inherited from interface it.unimi.dsi.webgraph.LazyIntIterator
nextInt
 

Constructor Detail

AbstractLazyIntIterator

public AbstractLazyIntIterator()
Method Detail

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).