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, Closeable, Iterator<MutableString>, 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.
FileLinesList.FileLinesIterator
protected FileLinesList.FileLinesIterator(FileLinesList fileLinesList,
int index,
FastBufferedInputStream inputStream,
CharsetDecoder decoder,
ByteBuffer byteBuffer,
CharBuffer charBuffer)
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<MutableString>- Specified by:
hasNext in interface ListIterator<MutableString>
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious in interface BidirectionalIterator<MutableString>- Specified by:
hasPrevious in interface ListIterator<MutableString>
next
public MutableString next()
- Specified by:
next in interface Iterator<MutableString>- Specified by:
next in interface ListIterator<MutableString>
previous
public MutableString previous()
- Specified by:
previous in interface BidirectionalIterator<MutableString>- Specified by:
previous in interface ListIterator<MutableString>
nextIndex
public int nextIndex()
- Specified by:
nextIndex in interface ListIterator<MutableString>
previousIndex
public int previousIndex()
- Specified by:
previousIndex in interface ListIterator<MutableString>
close
public void close()
- Specified by:
close in interface Closeable
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable