|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.io.FileLineIterator<E>
sbrt.shell.io.TextFileLineIterator<E>
E
- the returned type.public final class TextFileLineIterator<E>
This class is used to iterate over the lines of an input file.
Constructor Summary | |
---|---|
TextFileLineIterator(TextInputFile<E> file)
Constructs a new text file line iterator using the provided text input file. |
Method Summary | |
---|---|
void |
close()
Closes this file iterator. |
protected void |
finalize()
Disposes of system resources associated with this file iterator when called by the garbage collector. |
boolean |
hasNext()
Indicates if the file has more lines. |
boolean |
isClosed()
Indicates if this iterator has been closed. |
static boolean |
isValidFormat(FileFormat fileFormat)
Indicates if the provided file format is valid for this type of file line iterator. |
E |
next()
Returns the next element in the file. |
void |
remove()
Throws UnsupportedOperationException. |
Methods inherited from class sbrt.shell.io.FileLineIterator |
---|
checkFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextFileLineIterator(TextInputFile<E> file)
file
- the file to be iterated over.Method Detail |
---|
public static boolean isValidFormat(FileFormat fileFormat)
fileFormat
- the file format to test.
true
if the provided file format is
valid for a text input file; false
otherwise.public E next()
java.util.NoSuchElementException
- if the file
has no more elements.public boolean hasNext()
true
if the file has more lines;
false
otherwise.public void remove()
java.lang.UnsupportedOperationException
public boolean isClosed()
true
if close() has
been called; false
otherwise.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- the Exception raised by this method.Object.finalize()
public void close()
ApplicationException
- if an I/O error occurred
while closing this file iterator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |