|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<File,File> de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.FileParameter
public class FileParameter
Parameter class for a parameter specifying a file.
Nested Class Summary | |
---|---|
static class |
FileParameter.FileType
Available file types: FileParameter.FileType.INPUT_FILE denotes an input file,
FileParameter.FileType.OUTPUT_FILE denotes an output file. |
Field Summary | |
---|---|
private FileParameter.FileType |
fileType
The file type of this file parameter. |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter |
---|
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription |
Constructor Summary | |
---|---|
FileParameter(OptionID optionID,
FileParameter.FileType fileType)
Constructs a file parameter with the given optionID, and file type. |
|
FileParameter(OptionID optionID,
FileParameter.FileType fileType,
boolean optional)
Constructs a file parameter with the given optionID, file type, and optional flag. |
Method Summary | |
---|---|
String |
getSyntax()
Returns a string representation of the parameter's type. |
String |
getValueAsString()
Get the value as string. |
protected File |
parseValue(Object obj)
Parse a given value into the destination type. |
protected boolean |
validate(File obj)
Validate a value after parsing (e.g. do constrain checks!) |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter |
---|
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private FileParameter.FileType fileType
Constructor Detail |
---|
public FileParameter(OptionID optionID, FileParameter.FileType fileType)
optionID
- optionID the unique id of the optionfileType
- the file type of this file parameterpublic FileParameter(OptionID optionID, FileParameter.FileType fileType, boolean optional)
optionID
- optionID the unique id of the optionfileType
- the file type of this file parameteroptional
- specifies if this parameter is an optional parameterMethod Detail |
---|
public String getValueAsString()
null
getValueAsString
in class Parameter<File,File>
protected File parseValue(Object obj) throws ParameterException
parseValue
in class Parameter<File,File>
obj
- Object to parse (may be a string representation!)
ParameterException
- when the object cannot be parsed.protected boolean validate(File obj) throws ParameterException
validate
in class Parameter<File,File>
obj
- Object to validate
ParameterException
- when the object is not valid.public String getSyntax()
getSyntax
in class Parameter<File,File>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |