org.dllearner.core.options
Class DoubleConfigOption
java.lang.Object
org.dllearner.core.options.ConfigOption<Double>
org.dllearner.core.options.DoubleConfigOption
public class DoubleConfigOption
- extends ConfigOption<Double>
Represents a configuration option with values of type value. Similar to the
integer option a minimum and a maximum value can specified.
- Author:
- Jens Lehmann
| Methods inherited from class org.dllearner.core.options.ConfigOption |
getDefaultValue, getDefaultValueInJava, getDescription, getJavaDocString, getJavaImports, getName, isMandatory, requiresInit, setDefaultValue, setMandatory, setRequiresInit, toString |
DoubleConfigOption
public DoubleConfigOption(String name,
String description,
Double defaultValue)
DoubleConfigOption
public DoubleConfigOption(String name,
String description)
getValueTypeAsJavaString
public String getValueTypeAsJavaString()
- Specified by:
getValueTypeAsJavaString in class ConfigOption<Double>
isValidValue
public boolean isValidValue(Double value)
- Description copied from class:
ConfigOption
- Checks whether the value is valid, e.g. passing 1985 as
integer value for an option, which requires values between
0 and 1, is not valid.
- Specified by:
isValidValue in class ConfigOption<Double>
- Parameters:
value - A value for the option.
- Returns:
- True if the value is valid and false otherwise.
getLowerLimit
public double getLowerLimit()
- Returns:
- the The lowest possible value for this configuration option.
setLowerLimit
public void setLowerLimit(double lowerLimit)
- Parameters:
lowerLimit - The lowest possible value for this configuration option.
getUpperLimit
public double getUpperLimit()
- Returns:
- the The highest possible value for this configuration option.
setUpperLimit
public void setUpperLimit(double upperLimit)
- Parameters:
upperLimit - The highest possible value for this configuration option.
checkType
public boolean checkType(Object object)
- Description copied from class:
ConfigOption
- Checks whether the object has the correct type to be used as a value for
this option (this method is necessary, because generic information is
erased at runtime in Java).
- Specified by:
checkType in class ConfigOption<Double>
- Parameters:
object - The object to check.
- Returns:
- True of the type is correct, false otherwise.
getAllowedValuesDescription
public String getAllowedValuesDescription()
- Overrides:
getAllowedValuesDescription in class ConfigOption<Double>
getValueFormatting
public String getValueFormatting(Double value)
- Description copied from class:
ConfigOption
- Get a formatted value to put into configuration file.
- Specified by:
getValueFormatting in class ConfigOption<Double>
- Parameters:
value - Option value.
- Returns:
- A string to put into a conf file.
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann