Class LineIteratorImpl
- All Implemented Interfaces:
LineIterator, Closeable, AutoCloseable, Iterator<String>
A simple iterator over the elements in LineReader.
-
Field Summary
Fields inherited from class AbstractIterator
next -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractIterator
hasNext, isIterating, next, peek, removeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, hasNext, next, removeMethods inherited from interface LineIterator
peek
-
Constructor Details
-
LineIteratorImpl
- Parameters:
lineReader- The line reader whose elements are to be iterated over.
-
-
Method Details
-
advance
- Specified by:
advancein classAbstractIterator<String>- Returns:
- the next element or null if the iterator is at the end
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
-