public class FileListParameter extends ListParameter<FileListParameter,java.util.List<java.io.File>>
Modifier and Type | Class and Description |
---|---|
static class |
FileListParameter.FilesType
Available types of the files:
FileListParameter.FilesType.INPUT_FILES denotes input files,
FileListParameter.FilesType.OUTPUT_FILES denotes output files. |
Modifier and Type | Field and Description |
---|---|
private FileListParameter.FilesType |
filesType
Specifies the type of the files, i.e. if the files are input or output
files.
|
LIST_SEP, SPLIT, VECTOR_SEP, VECTOR_SPLIT
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
FileListParameter(OptionID optionID,
FileListParameter.FilesType filesType)
Constructs a file list parameter with the given optionID, and file type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultValueAsString()
Get the default value as string.
|
java.lang.String |
getSyntax()
Returns a string representation of the parameter's type.
|
java.lang.String |
getValueAsString()
Get the value as string.
|
protected java.util.List<java.io.File> |
parseValue(java.lang.Object obj)
Parse a given value into the destination type.
|
int |
size()
Size of the list.
|
protected boolean |
validate(java.util.List<java.io.File> obj)
Validate a value after parsing (e.g. do constraint checks!)
|
addConstraint, describeValues, getConstraints, getDefaultValue, getOptionID, getShortDescription, getValue, hasDefaultValue, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue
private FileListParameter.FilesType filesType
public FileListParameter(OptionID optionID, FileListParameter.FilesType filesType)
optionID
- the unique id of this file list parameterfilesType
- the file type of this file list parameterpublic java.lang.String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<java.util.List<java.io.File>>
getValueAsString
in class AbstractParameter<FileListParameter,java.util.List<java.io.File>>
public java.lang.String getDefaultValueAsString()
Parameter
getDefaultValueAsString
in interface Parameter<java.util.List<java.io.File>>
getDefaultValueAsString
in class AbstractParameter<FileListParameter,java.util.List<java.io.File>>
protected java.util.List<java.io.File> parseValue(java.lang.Object obj) throws ParameterException
AbstractParameter
parseValue
in class AbstractParameter<FileListParameter,java.util.List<java.io.File>>
obj
- Object to parse (may be a string representation!)ParameterException
- when the object cannot be parsed.protected boolean validate(java.util.List<java.io.File> obj) throws ParameterException
AbstractParameter
validate
in class AbstractParameter<FileListParameter,java.util.List<java.io.File>>
obj
- Object to validateParameterException
- when the object is not valid.public int size()
ListParameter
size
in class ListParameter<FileListParameter,java.util.List<java.io.File>>
public java.lang.String getSyntax()
getSyntax
in interface Parameter<java.util.List<java.io.File>>
getSyntax
in class AbstractParameter<FileListParameter,java.util.List<java.io.File>>
Copyright © 2019 ELKI Development Team. License information.