de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class PatternParameter

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<Pattern,Pattern>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.PatternParameter

public class PatternParameter
extends Parameter<Pattern,Pattern>

Parameter class for a parameter specifying a pattern.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
PatternParameter(OptionID optionID)
          Constructs a pattern parameter with the given optionID.
PatternParameter(OptionID optionID, boolean optional)
          Constructs a pattern parameter with the given optionID.
PatternParameter(OptionID optionID, List<ParameterConstraint<Pattern>> constraints)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, List<ParameterConstraint<Pattern>> constraints, boolean optional)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, List<ParameterConstraint<Pattern>> constraint, Pattern defaultValue)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, List<ParameterConstraint<Pattern>> constraint, String defaultValue)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, ParameterConstraint<Pattern> constraint)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, ParameterConstraint<Pattern> constraint, boolean optional)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, ParameterConstraint<Pattern> constraint, Pattern defaultValue)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, ParameterConstraint<Pattern> constraint, String defaultValue)
          Constructs a pattern parameter with the given optionID, constraints and default value.
PatternParameter(OptionID optionID, Pattern defaultValue)
          Constructs a pattern parameter with the given optionID, and default value.
PatternParameter(OptionID optionID, String defaultValue)
          Constructs a pattern parameter with the given optionID, and default value.
 
Method Summary
 String getSyntax()
          Returns a string representation of the parameter's type.
 String getValueAsString()
          Get the value as string.
protected  Pattern parseValue(Object obj)
          Parse a given value into the destination type.
 
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, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternParameter

public PatternParameter(OptionID optionID,
                        List<ParameterConstraint<Pattern>> constraint,
                        Pattern defaultValue)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        List<ParameterConstraint<Pattern>> constraint,
                        String defaultValue)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        List<ParameterConstraint<Pattern>> constraints,
                        boolean optional)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraints - parameter constraint
optional - Flag to signal an optional parameter.

PatternParameter

public PatternParameter(OptionID optionID,
                        List<ParameterConstraint<Pattern>> constraints)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraints - parameter constraint

PatternParameter

public PatternParameter(OptionID optionID,
                        ParameterConstraint<Pattern> constraint,
                        Pattern defaultValue)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        ParameterConstraint<Pattern> constraint,
                        String defaultValue)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        ParameterConstraint<Pattern> constraint,
                        boolean optional)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint
optional - Flag to signal an optional parameter.

PatternParameter

public PatternParameter(OptionID optionID,
                        ParameterConstraint<Pattern> constraint)
Constructs a pattern parameter with the given optionID, constraints and default value.

Parameters:
optionID - the unique id of the parameter
constraint - parameter constraint

PatternParameter

public PatternParameter(OptionID optionID,
                        Pattern defaultValue)
Constructs a pattern parameter with the given optionID, and default value.

Parameters:
optionID - the unique id of the parameter
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        String defaultValue)
Constructs a pattern parameter with the given optionID, and default value.

Parameters:
optionID - the unique id of the parameter
defaultValue - the default value of the parameter

PatternParameter

public PatternParameter(OptionID optionID,
                        boolean optional)
Constructs a pattern parameter with the given optionID.

Parameters:
optionID - the unique id of the parameter
optional - Flag to signal an optional parameter.

PatternParameter

public PatternParameter(OptionID optionID)
Constructs a pattern parameter with the given optionID.

Parameters:
optionID - the unique id of the parameter
Method Detail

getValueAsString

public String getValueAsString()
Get the value as string. May return null

Specified by:
getValueAsString in class Parameter<Pattern,Pattern>
Returns:
Value as string

parseValue

protected Pattern parseValue(Object obj)
                      throws ParameterException
Parse a given value into the destination type.

Specified by:
parseValue in class Parameter<Pattern,Pattern>
Parameters:
obj - Object to parse (may be a string representation!)
Returns:
Parsed object
Throws:
ParameterException - when the object cannot be parsed.

getSyntax

public String getSyntax()
Returns a string representation of the parameter's type.

Specified by:
getSyntax in class Parameter<Pattern,Pattern>
Returns:
"<pattern>"

Release 0.4.0 (2011-09-20_1324)