|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.testing.FileIterator
This is a utility class that is an iterator over the lines produced by reading a file. It is used in particular by various JUnit tests.
| Field Summary | |
private String |
nextLine
The next value to be returned by the iterator. |
private BufferedReader |
r
A reader that reads lines from the file. |
| Constructor Summary | |
FileIterator(String filename)
Starts an iterator reading from the given external process. |
|
| Method Summary | |
boolean |
hasNext()
Per a standard iterator, returns true if there is another value waiting. |
Object |
next()
Per a standard iterator, returns the next value - and throws java.util.NoSuchElementException if the list has been exhausted (hasNext() returns false). |
void |
remove()
This operation will throw an exception, as there is no need for remove in this context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private BufferedReader r
private String nextLine
| Constructor Detail |
public FileIterator(String filename)
throws IOException
IOException| Method Detail |
public boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic void remove()
remove in interface Iterator
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||