org.dllearner.core.options
Class IntegerConfigOption
java.lang.Object
org.dllearner.core.options.ConfigOption<Integer>
org.dllearner.core.options.IntegerConfigOption
public class IntegerConfigOption
- extends ConfigOption<Integer>
A configuration option, which allows values of type integer. A minimum and
maximum value of the argument can optionally be 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 |
IntegerConfigOption
public IntegerConfigOption(String name,
String description,
Integer defaultValue,
boolean mandatory,
boolean requiresInit)
IntegerConfigOption
public IntegerConfigOption(String name,
String description,
Integer defaultValue)
IntegerConfigOption
public IntegerConfigOption(String name,
String description)
getValueTypeAsJavaString
public String getValueTypeAsJavaString()
- Specified by:
getValueTypeAsJavaString in class ConfigOption<Integer>
isValidValue
public boolean isValidValue(Integer 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<Integer>
- Parameters:
value - A value for the option.
- Returns:
- True if the value is valid and false otherwise.
getLowerLimit
public int getLowerLimit()
- Returns:
- the The lowest possible value for this configuration option.
setLowerLimit
public void setLowerLimit(int lowerLimit)
- Parameters:
lowerLimit - The lowest possible value for this configuration option.
getUpperLimit
public int getUpperLimit()
- Returns:
- the The highest possible value for this configuration option.
setUpperLimit
public void setUpperLimit(int 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<Integer>
- Parameters:
object - The object to check.
- Returns:
- True of the type is correct, false otherwise.
getAllowedValuesDescription
public String getAllowedValuesDescription()
- Overrides:
getAllowedValuesDescription in class ConfigOption<Integer>
getValueFormatting
public String getValueFormatting(Integer value)
- Description copied from class:
ConfigOption
- Get a formatted value to put into configuration file.
- Specified by:
getValueFormatting in class ConfigOption<Integer>
- 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-2008 Jens Lehmann