|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Directory
Directory of TextFiles.
Constructor Summary | |
Directory()
Construct a Directory. |
Method Summary | |
void |
addTextFile(String name,
TextFile afile)
Add a TextFile to this Directory. |
String[] |
getFileNames()
Get the contents of this Directory as an array of the file names, each of which is a String. |
int |
getSize()
The size of a directory is the number of TextFiles it contains. |
static void |
main(String[] args)
main, for unit testing. |
TextFile |
retrieveTextFile(String filename)
Get a TextFile in this Directory, by name . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Directory()
Method Detail |
public void addTextFile(String name, TextFile afile)
name
- the name under which this TextFile is added.afile
- the TextFile to add.public String[] getFileNames()
public int getSize()
public static void main(String[] args)
java Directoryshould produce output
bill 17 Sun Jan 06 19:40:13 EST 2003 diary eb 12 Sun Jan 06 19:40:13 EST 2003 greeting(with current dates, of course).
public TextFile retrieveTextFile(String filename)
filename
- the name of the TextFile to find.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |