|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kth.pdc.grid.utility.FileEndingIterator
public class FileEndingIterator
Lists all the files in the given directory that end with a certain ending.
| Field Summary | |
|---|---|
protected String |
ending
The file ending. |
protected File[] |
fileList
The list of files in the directory. |
protected int |
index
The index of the next match in the fileList. |
protected boolean |
nextFound
A flag to show that there are more files that match. |
| Constructor Summary | |
|---|---|
FileEndingIterator(String path,
String ending)
Creates new FileIterator and searches the first match. |
|
| Method Summary | |
|---|---|
protected boolean |
findNext()
Finds the next matching file in the list of files. |
boolean |
hasNext()
Used to check that there are more matching files to get using next(). |
File |
next()
Used to get the next matching file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String ending
protected boolean nextFound
protected File[] fileList
protected int index
| Constructor Detail |
|---|
public FileEndingIterator(String path,
String ending)
path - The directory used for the file search.ending - The file ending to search for.| Method Detail |
|---|
public File next()
public boolean hasNext()
protected boolean findNext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||