T - the type of a possible value (i.e., the type of the option)public interface Parameter<T>
de.lmu.ifi.dbs.elki.utilities.optionhandling package for
 documentation!| Modifier and Type | Method and Description | 
|---|---|
| Parameter<T> | addConstraint(ParameterConstraint<? super T> constraint)Add an additional constraint. | 
| java.lang.StringBuilder | describeValues(java.lang.StringBuilder description)Describe the valid values. | 
| java.util.List<ParameterConstraint<? super T>> | getConstraints()Get the parameter constraints. | 
| T | getDefaultValue()Returns the default value of the parameter. | 
| java.lang.String | getDefaultValueAsString()Get the default value as string. | 
| OptionID | getOptionID()Return the OptionID of this option. | 
| java.lang.String | getShortDescription()Returns the short description of the option. | 
| java.lang.String | getSyntax()Returns a string representation of the parameter's type (e.g. an
  IntParametershould return<int>). | 
| T | getValue()Returns the value of the option. | 
| java.lang.String | getValueAsString()Get the value as string. | 
| boolean | hasDefaultValue()Checks if this parameter has a default value. | 
| boolean | isDefined()Returns true if the value of the option is defined, false otherwise. | 
| boolean | isOptional()Checks if this parameter is an optional parameter. | 
| boolean | isValid(java.lang.Object obj)Checks if the given argument is valid for this option. | 
| Parameter<T> | setDefaultValue(T defaultValue)Sets the default value of this parameter. | 
| Parameter<T> | setOptional(boolean opt)Specifies if this parameter is an optional parameter. | 
| void | setShortDescription(java.lang.String description)Sets the short description of the option. | 
| void | setValue(java.lang.Object obj)Sets the value of the option. | 
| boolean | tookDefaultValue()Checks if the default value of this parameter was taken as the actual
 parameter value. | 
| boolean | tryDefaultValue()Handle default values for a parameter. | 
Parameter<T> setDefaultValue(T defaultValue)
defaultValue - default value of this parameterboolean hasDefaultValue()
boolean tryDefaultValue()
                 throws UnspecifiedParameterException
true if it has a default value, false
         if it is optional without a default value. Exception if it is a
         required parameter!UnspecifiedParameterException - If the parameter requires a valueParameter<T> setOptional(boolean opt)
opt - true if this parameter is optional, false otherwiseboolean isOptional()
boolean tookDefaultValue()
boolean isDefined()
T getDefaultValue()
If the parameter has no default value, the method returns null.
OptionID getOptionID()
java.lang.String getShortDescription()
void setShortDescription(java.lang.String description)
description - the short description to be setvoid setValue(java.lang.Object obj)
       throws ParameterException
obj - the option's value to be setParameterException - if the given value is not a valid value for this
         option.T getValue()
Parameterization.grab(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<?>)
 or isDefined() to test if getValue() will return a well-defined
 value.boolean isValid(java.lang.Object obj)
         throws ParameterException
obj - option value to be checkedParameterException - if the given value is not a valid value for this
         option.java.lang.String getSyntax()
IntParameter
 should return <int>).java.lang.String getValueAsString()
nulljava.lang.String getDefaultValueAsString()
java.lang.StringBuilder describeValues(java.lang.StringBuilder description)
description - Buffer to append toParameter<T> addConstraint(ParameterConstraint<? super T> constraint)
constraint - Constraint to add.java.util.List<ParameterConstraint<? super T>> getConstraints()
Copyright © 2019 ELKI Development Team. License information.