Package it.unimi.dsi.big.io
Class FileLinesCollection.FileLinesIterator
- java.lang.Object
-
- it.unimi.dsi.big.io.FileLinesCollection.FileLinesIterator
-
- All Implemented Interfaces:
SafelyCloseable,Closeable,AutoCloseable,Iterator<MutableString>
- Enclosing class:
- FileLinesCollection
public static final class FileLinesCollection.FileLinesIterator extends Object implements Iterator<MutableString>, SafelyCloseable
An iterator over the lines of aFileLinesCollection.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
Modifier and Type Method Description voidclose()protected voidfinalize()booleanhasNext()MutableStringnext()-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<MutableString>
-
next
public MutableString next()
- Specified by:
nextin interfaceIterator<MutableString>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-