Package it.unimi.dsi.io
Class FileLinesMutableStringIterable.FileLinesIterator
java.lang.Object
it.unimi.dsi.io.FileLinesMutableStringIterable.FileLinesIterator
- All Implemented Interfaces:
SafelyCloseable
,Closeable
,AutoCloseable
,Iterator<MutableString>
- Enclosing class:
- FileLinesMutableStringIterable
public static final class FileLinesMutableStringIterable.FileLinesIterator
extends Object
implements Iterator<MutableString>, SafelyCloseable
An iterator over the lines of a
FileLinesMutableStringIterable
.
Instances of this class open an input stream, 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 Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<MutableString>
-
next
- Specified by:
next
in interfaceIterator<MutableString>
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<MutableString>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
finalize
-