it.unimi.dsi.io
Class FileLinesCollection.FileLinesIterator

java.lang.Object
  extended by it.unimi.dsi.io.FileLinesCollection.FileLinesIterator
All Implemented Interfaces:
SafelyCloseable, Closeable, Iterator<MutableString>
Enclosing class:
FileLinesCollection

public static final class FileLinesCollection.FileLinesIterator
extends Object
implements Iterator<MutableString>, SafelyCloseable

An iterator over the lines of a FileLinesCollection.

Instances of this class open an InputStream, and thus should be closed after usage. A “safety-net” finaliser tries to take care of the cases in which closing an instance is impossible. An exhausted iterator, however, will be closed automagically.


Method Summary
 void close()
           
protected  void finalize()
           
 boolean hasNext()
           
 MutableString next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<MutableString>

next

public MutableString next()
Specified by:
next in interface Iterator<MutableString>

remove

public void remove()
Specified by:
remove in interface Iterator<MutableString>

close

public void close()
Specified by:
close in interface Closeable

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable