|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFile
A File represents an operating system structure that is used to access the contents of a file.
In this simulation, files have no content so there are no methods for accessing the file contents.
Field Summary | |
private int |
fileNumber
fileNumber is the file number for this file. |
static int |
NULL
File.NULL is the file number for nonexistent files. |
Constructor Summary | |
File()
new File() returns a new file. |
Method Summary | |
static int |
fileNumber(java.lang.Integer fn)
File.fileNumber(fn) returns an int file number for the Integer fn. |
int |
getFileNumber()
f.getFileNumber() returns the file number of f. |
boolean |
isDirectory()
f.isDirectory() returns true if f is a directory. |
void |
setFileNumber(int fn)
f.setFileNumber(fn) sets the file number of f to fn. |
java.lang.String |
toString()
f.toString() returns the class name and file number of f as a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NULL
private int fileNumber
Constructor Detail |
public File()
Method Detail |
public boolean isDirectory()
public int getFileNumber()
public void setFileNumber(int fn)
public java.lang.String toString()
public static int fileNumber(java.lang.Integer fn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |