Package it.unimi.dsi.sux4j.io
Class FileLinesList.FileLinesIterator
java.lang.Object
it.unimi.dsi.sux4j.io.FileLinesList.FileLinesIterator
- All Implemented Interfaces:
BidirectionalIterator<MutableString>
,ObjectBidirectionalIterator<MutableString>
,ObjectIterator<MutableString>
,ObjectListIterator<MutableString>
,SafelyCloseable
,Closeable
,AutoCloseable
,Iterator<MutableString>
,ListIterator<MutableString>
- Enclosing class:
- FileLinesList
public static final class FileLinesList.FileLinesIterator
extends Object
implements ObjectListIterator<MutableString>, 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.-
Constructor Summary
ModifierConstructorDescriptionprotected
FileLinesIterator
(FileLinesList fileLinesList, int 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
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
back, skip
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectListIterator
add, remove, set
-
Constructor Details
-
FileLinesIterator
protected FileLinesIterator(FileLinesList fileLinesList, int index, FastBufferedInputStream inputStream, CharsetDecoder decoder, ByteBuffer byteBuffer, CharBuffer charBuffer)
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<MutableString>
- Specified by:
hasNext
in interfaceListIterator<MutableString>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceBidirectionalIterator<MutableString>
- Specified by:
hasPrevious
in interfaceListIterator<MutableString>
-
next
- Specified by:
next
in interfaceIterator<MutableString>
- Specified by:
next
in interfaceListIterator<MutableString>
-
previous
- Specified by:
previous
in interfaceBidirectionalIterator<MutableString>
- Specified by:
previous
in interfaceListIterator<MutableString>
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<MutableString>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<MutableString>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
finalize
-