de.lmu.ifi.dbs.elki.utilities.optionhandling
Class ClassListParameter
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.Option<T>
de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter<List<T>,List<T>>
de.lmu.ifi.dbs.elki.utilities.optionhandling.ListParameter<String>
de.lmu.ifi.dbs.elki.utilities.optionhandling.ClassListParameter
- All Implemented Interfaces:
- Loggable
public class ClassListParameter
- extends ListParameter<String>
Parameter class for a parameter specifying a list of class names.
- Author:
- Steffi Wanka
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter |
addConstraint, addConstraintList, getDefaultValue, getDescription, getValue, hasDefaultValue, isOptional, isSet, reset, setDefaultValue, setDefaultValueToValue, setOptional, tookDefaultValue |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
restrictionClass
private Class<?> restrictionClass
- The restriction class for the list of class names.
ClassListParameter
@Deprecated
public ClassListParameter(String name,
String description,
Class<?> restrictionClass)
- Deprecated.
- Constructs a class list parameter with the given name, description, and
restriction class.
- Parameters:
name
- the parameter namedescription
- the parameter descriptionrestrictionClass
- the restriction class of the list of class names
setValue
public void setValue(String value)
throws ParameterException
- Description copied from class:
Option
- Sets the value of the option.
- Specified by:
setValue
in class Option<List<String>>
- Parameters:
value
- the option's value to be set
- Throws:
ParameterException
- if the given value is not a valid value for this option.- See Also:
Option.setValue(String)
getRestrictionClasses
public String[] getRestrictionClasses()
- Returns the class names allowed according to the restriction class of
this parameter.
- Returns:
- class names allowed according to the restriction class defined.
isValid
public boolean isValid(String value)
throws ParameterException
- Description copied from class:
Option
- Checks if the given argument is valid for this option.
- Specified by:
isValid
in class Option<List<String>>
- Parameters:
value
- option value to be checked
- Returns:
- true, if the given value is valid for this option
- Throws:
ParameterException
- if the given value is not a valid value for this option.- See Also:
Option.isValid(java.lang.String)
getParameterType
protected String getParameterType()
- Returns a string representation of the parameter's type.
- Specified by:
getParameterType
in class Parameter<List<String>,List<String>>
- Returns:
- "<class_1,...,class_n>"
- See Also:
Parameter.getParameterType()