it.unimi.dsi.sux4j.io
Class FileLinesList.FileLinesIterator
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObjectIterator<K>
it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator<K>
it.unimi.dsi.fastutil.objects.AbstractObjectListIterator<MutableString>
it.unimi.dsi.sux4j.io.FileLinesList.FileLinesIterator
- All Implemented Interfaces:
- BidirectionalIterator<MutableString>, ObjectBidirectionalIterator<MutableString>, ObjectIterator<MutableString>, ObjectListIterator<MutableString>, SafelyCloseable, java.io.Closeable, java.util.Iterator<MutableString>, java.util.ListIterator<MutableString>
- Enclosing class:
- FileLinesList
public static final class FileLinesList.FileLinesIterator
- extends AbstractObjectListIterator<MutableString>
- implements SafelyCloseable
An iterator over the lines of a FileLinesList
. 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.
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.ListIterator |
remove |
FileLinesList.FileLinesIterator
protected FileLinesList.FileLinesIterator(FileLinesList fileLinesList,
int index,
FastBufferedInputStream inputStream,
java.nio.charset.CharsetDecoder decoder,
java.nio.ByteBuffer byteBuffer,
java.nio.CharBuffer charBuffer)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<MutableString>
- Specified by:
hasNext
in interface java.util.ListIterator<MutableString>
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interface BidirectionalIterator<MutableString>
- Specified by:
hasPrevious
in interface java.util.ListIterator<MutableString>
next
public MutableString next()
- Specified by:
next
in interface java.util.Iterator<MutableString>
- Specified by:
next
in interface java.util.ListIterator<MutableString>
previous
public MutableString previous()
- Specified by:
previous
in interface BidirectionalIterator<MutableString>
- Specified by:
previous
in interface java.util.ListIterator<MutableString>
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interface java.util.ListIterator<MutableString>
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interface java.util.ListIterator<MutableString>
close
public void close()
- Specified by:
close
in interface java.io.Closeable
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable