|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--de.qfs.lib.option.Option | +--de.qfs.lib.option.FileOption
A FileOption's value is of class File. Additional flags determine, whether the file must exist and if it must be a file, a directory or can be either.
Field Summary | |
static int |
ANY_TYPE
The file may be either a plain file or a directory. |
static int |
DIRECTORY_TYPE
The file must be a directory. |
static int |
FILE_TYPE
The file must be a plain file. |
Constructor Summary | |
FileOption()
Create a new FileOption. |
|
FileOption(java.lang.String name,
java.io.File value)
Create a new FileOption. |
|
FileOption(java.lang.String name,
java.io.File value,
boolean nullOK,
boolean mustExist,
int fileType)
Create a new FileOption. |
Method Summary | |
boolean |
equals(java.lang.Object object)
Two FileOptions are considered equal if their names and values are equal. |
java.lang.String |
getConfigurableValue()
Get the Option's value as a String. |
int |
getFileType()
Get the fileType of the FileOption. |
boolean |
isMustExist()
Get the mustExist state of the FileOption. |
void |
setConfigurableValue(java.lang.String val)
Set the Option's value from a String. |
void |
setFileType(int fileType)
Set the fileType of the FileOption. |
void |
setMustExist(boolean mustExist)
Set the mustExist state of the FileOption. |
Methods inherited from class de.qfs.lib.option.Option |
addResources, addValidator, checkValue, clone, getName, getResources, getValue, hashCode, isNullOK, removeValidator, setName, setNullOK, setResources, setValue, toString |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ANY_TYPE
public static final int FILE_TYPE
public static final int DIRECTORY_TYPE
Constructor Detail |
public FileOption()
public FileOption(java.lang.String name, java.io.File value)
name
- The name of the FileOption.value
- The initial value.public FileOption(java.lang.String name, java.io.File value, boolean nullOK, boolean mustExist, int fileType)
name
- The name of the FileOption.value
- The initial value.nullOK
- Whether the value may be null.mustExist
- Whether the file must exist.fileType
- The type of the file.Method Detail |
public final boolean isMustExist()
public final void setMustExist(boolean mustExist)
mustExist
- The mustExist state to set.public final int getFileType()
public final void setFileType(int fileType)
fileType
- The fileType to set.public boolean equals(java.lang.Object object)
equals
in class Option
object
- The object to compare to.public java.lang.String getConfigurableValue()
getConfigurableValue
in interface ConfigurableOption
public void setConfigurableValue(java.lang.String val)
setConfigurableValue
in interface ConfigurableOption
val
- The value to set.
|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |