
public class FileParameter extends AbstractParameter<File>
| Modifier and Type | Class and Description | 
|---|---|
| static class  | FileParameter.FileTypeAvailable file types:  FileParameter.FileType.INPUT_FILEdenotes an input file,FileParameter.FileType.OUTPUT_FILEdenotes an output file. | 
| Modifier and Type | Field and Description | 
|---|---|
| private FileParameter.FileType | fileTypeThe file type of this file parameter. | 
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription| Constructor and Description | 
|---|
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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!) | 
addConstraint, addConstraints, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValueprivate FileParameter.FileType fileType
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 parameterpublic String getValueAsString()
ParameternullgetValueAsString in interface Parameter<File>getValueAsString in class AbstractParameter<File>protected File parseValue(Object obj) throws ParameterException
AbstractParameterparseValue in class AbstractParameter<File>obj - Object to parse (may be a string representation!)ParameterException - when the object cannot be parsed.protected boolean validate(File obj) throws ParameterException
AbstractParametervalidate in class AbstractParameter<File>obj - Object to validateParameterException - when the object is not valid.