de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class FileListParameter
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<List<T>,List<T>>
de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ListParameter<File>
de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.FileListParameter
public class FileListParameter
- extends ListParameter<File>
Parameter class for a parameter specifying a list of files.
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 |
filesType
private FileListParameter.FilesType filesType
- Specifies the type of the files, i.e. if the files are input or output
files.
FileListParameter
public FileListParameter(OptionID optionID,
FileListParameter.FilesType filesType)
- Constructs a file list parameter with the given optionID, and file type.
- Parameters:
optionID
- the unique id of this file list parameterfilesType
- the file type of this file list parameter
getValueAsString
public String getValueAsString()
- Get the value as string. May return
null
- Specified by:
getValueAsString
in class Parameter<List<File>,List<File>>
- Returns:
- Value as string
parseValue
protected List<File> parseValue(Object obj)
throws ParameterException
- Parse a given value into the destination type.
- Specified by:
parseValue
in class Parameter<List<File>,List<File>>
- Parameters:
obj
- Object to parse (may be a string representation!)
- Returns:
- Parsed object
- Throws:
ParameterException
- when the object cannot be parsed.
validate
protected boolean validate(List<File> obj)
throws ParameterException
- Validate a value after parsing (e.g. do constrain checks!)
- Overrides:
validate
in class Parameter<List<File>,List<File>>
- Parameters:
obj
- Object to validate
- Returns:
- true iff the object is valid for this parameter.
- Throws:
ParameterException
- when the object is not valid.
getSyntax
public String getSyntax()
- Returns a string representation of the parameter's type.
- Specified by:
getSyntax
in class Parameter<List<File>,List<File>>
- Returns:
- "<file_1,...,file_n>"