org.dllearner.core.options
Class BooleanConfigOption
java.lang.Object
org.dllearner.core.options.ConfigOption<Boolean>
org.dllearner.core.options.BooleanConfigOption
public class BooleanConfigOption
- extends ConfigOption<Boolean>
A configuration option representing a boolean value.
- Author:
- Jens Lehmann
|
Method Summary |
boolean |
checkType(Object object)
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). |
String |
getValueFormatting(Boolean value)
Get a formatted value to put into configuration file. |
String |
getValueTypeAsJavaString()
|
boolean |
isValidValue(Boolean value)
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. |
| Methods inherited from class org.dllearner.core.options.ConfigOption |
getAllowedValuesDescription, getDefaultValue, getDefaultValueInJava, getDescription, getJavaDocString, getJavaImports, getName, isMandatory, requiresInit, setDefaultValue, setMandatory, setRequiresInit, toString |
BooleanConfigOption
public BooleanConfigOption(String name,
String description)
BooleanConfigOption
public BooleanConfigOption(String name,
String description,
Boolean defaultValue)
BooleanConfigOption
public BooleanConfigOption(String name,
String description,
Boolean defaultValue,
boolean mandatory,
boolean requiresInit)
getValueTypeAsJavaString
public String getValueTypeAsJavaString()
- Specified by:
getValueTypeAsJavaString in class ConfigOption<Boolean>
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<Boolean>
- Parameters:
object - The object to check.
- Returns:
- True of the type is correct, false otherwise.
isValidValue
public boolean isValidValue(Boolean 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<Boolean>
- Parameters:
value - A value for the option.
- Returns:
- True if the value is valid and false otherwise.
getValueFormatting
public String getValueFormatting(Boolean value)
- Description copied from class:
ConfigOption
- Get a formatted value to put into configuration file.
- Specified by:
getValueFormatting in class ConfigOption<Boolean>
- 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