Package it.unimi.dsi.sux4j.io
Class FileLinesBigList.FileLinesIterator
java.lang.Object
it.unimi.dsi.sux4j.io.FileLinesBigList.FileLinesIterator
- All Implemented Interfaces:
BidirectionalIterator<MutableString>
,BigListIterator<MutableString>
,ObjectBidirectionalIterator<MutableString>
,ObjectBigListIterator<MutableString>
,ObjectIterator<MutableString>
,SafelyCloseable
,Closeable
,AutoCloseable
,Iterator<MutableString>
- Enclosing class:
- FileLinesBigList
public static final class FileLinesBigList.FileLinesIterator
extends Object
implements ObjectBigListIterator<MutableString>, SafelyCloseable
An iterator over the lines of a
FileLinesBigList
. 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.-
Constructor Summary
ModifierConstructorDescriptionprotected
FileLinesIterator
(FileLinesBigList fileLinesList, long index, FastBufferedInputStream inputStream, CharsetDecoder decoder, ByteBuffer byteBuffer, CharBuffer charBuffer) -
Method Summary
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
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
back
-
Constructor Details
-
FileLinesIterator
protected FileLinesIterator(FileLinesBigList fileLinesList, long index, FastBufferedInputStream inputStream, CharsetDecoder decoder, ByteBuffer byteBuffer, CharBuffer charBuffer)
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<MutableString>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceBidirectionalIterator<MutableString>
-
next
- Specified by:
next
in interfaceIterator<MutableString>
-
previous
- Specified by:
previous
in interfaceBidirectionalIterator<MutableString>
-
nextIndex
public long nextIndex()- Specified by:
nextIndex
in interfaceBigListIterator<MutableString>
-
previousIndex
public long previousIndex()- Specified by:
previousIndex
in interfaceBigListIterator<MutableString>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
finalize
-