|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectj_waste.FileDatabase
This is the File database in J-WASTE, it holds a list of all files with number and name.
| Constructor Summary | |
FileDatabase()
Constructs an empty FileDatabase. |
|
| Method Summary | |
static void |
addFile(java.io.File toAdd)
Adds a File to the database. |
static java.io.File |
getFile(int index)
Returns the File Object at the given position. |
static java.io.File[] |
getFiles(java.io.File directory)
Returns a list of all Files in the given directory. |
static int |
getID(java.io.File file)
Returns the ID of a specific File. |
static void |
populate()
Populates the file database, reads the path from config and adds the files to the database. |
static int |
size()
Returns the size (number of elements) of this FileDatabase. |
java.lang.String |
toString()
This method returns a String with all files in the database in a format suitable for display in a console. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FileDatabase()
| Method Detail |
public static java.io.File getFile(int index)
index - position in the database.
public static void addFile(java.io.File toAdd)
toAdd - the File to add.public static int getID(java.io.File file)
file - the File for which to return the ID.
public static int size()
public static void populate()
public static java.io.File[] getFiles(java.io.File directory)
directory - the directory from which to list Files.
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||