de.lmu.ifi.dbs.elki.utilities.optionhandling
Class PatternParameter
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<String,String>
de.lmu.ifi.dbs.elki.utilities.optionhandling.PatternParameter
- All Implemented Interfaces:
- Loggable
public class PatternParameter
- extends Parameter<String,String>
Parameter class for a parameter specifying a pattern.
- Author:
- Steffi Wanka
Method Summary |
protected String |
getParameterType()
Returns a string representation of the parameter's type. |
boolean |
isValid(String value)
Checks if the given argument is valid for this option. |
void |
setValue(String value)
Sets the value of the option. |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatternParameter
public PatternParameter(OptionID optionID)
- Constructs a pattern parameter with the given optionID.
- Parameters:
optionID
- the unique id of the parameter
PatternParameter
@Deprecated
public PatternParameter(String name,
String description)
- Deprecated.
- Constructs a pattern parameter with the given name and description.
- Parameters:
name
- the parameter namedescription
- the parameter description
PatternParameter
@Deprecated
public PatternParameter(String name,
String description,
ParameterConstraint<String> con)
- Deprecated.
- Constructs a pattern parameter with the given name, description, and
parameter constraint.
- Parameters:
name
- the name of this parameterdescription
- the description of this parametercon
- a parameter constraint for this parameter
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<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)
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<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<String,String>
- Returns:
- "<pattern>"
- See Also:
Parameter.getParameterType()