|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractObjectIterator<MutableString>
it.unimi.dsi.mg4j.io.LineIterator
dsiutils
.
@Deprecated public class LineIterator
An adapter that exposes a fast buffered reader as an iterator
over the returned lines. Since we just actually read a line to know
whether hasNext()
should return true, the last line read
from the underlying fast buffered reader has to be cached.
Mixing calls to this adapter and to the underlying fast buffered
reader will not usually give the expected results.
This class reuses the same mutable strings. As a result,
the comments for FileLinesCollection
apply here. If you want just get all the lines, use allLines()
.
Constructor Summary | |
---|---|
LineIterator(FastBufferedReader fastBufferedReader)
Deprecated. Creates a new line iterator over a specified fast buffered reader. |
|
LineIterator(FastBufferedReader fastBufferedReader,
ProgressLogger pl)
Deprecated. Creates a new line iterator over a specified fast buffered reader. |
Method Summary | |
---|---|
List<MutableString> |
allLines()
Deprecated. Returns all lines remaining in this iterator as a list. |
boolean |
hasNext()
Deprecated. |
MutableString |
next()
Deprecated. |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator |
---|
remove, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineIterator(FastBufferedReader fastBufferedReader, ProgressLogger pl)
fastBufferedReader
- the underlying buffered reader.pl
- an optional progress logger, or null
.public LineIterator(FastBufferedReader fastBufferedReader)
fastBufferedReader
- the underlying buffered reader.Method Detail |
---|
public boolean hasNext()
public MutableString next()
public List<MutableString> allLines()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |