org.dllearner.core.options
Class StringSetConfigOption

java.lang.Object
  extended by org.dllearner.core.options.ConfigOption<Set<String>>
      extended by org.dllearner.core.options.StringSetConfigOption

public class StringSetConfigOption
extends ConfigOption<Set<String>>

A set of strings.

Author:
Jens Lehmann

Constructor Summary
StringSetConfigOption(String name, String description)
           
StringSetConfigOption(String name, String description, Set<String> defaultValue)
           
StringSetConfigOption(String name, String description, Set<String> defaultValue, boolean mandatory, boolean requiresInit)
           
 
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).
 SortedSet<String> getJavaImports()
          TODO Method should be removed and a mapping table in ConfigJavaGenerator created instead.
 String getValueFormatting(Set<String> value)
          Get a formatted value to put into configuration file.
 String getValueTypeAsJavaString()
           
 boolean isValidValue(Set<String> 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, getName, isMandatory, requiresInit, setDefaultValue, setMandatory, setRequiresInit, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringSetConfigOption

public StringSetConfigOption(String name,
                             String description)

StringSetConfigOption

public StringSetConfigOption(String name,
                             String description,
                             Set<String> defaultValue)

StringSetConfigOption

public StringSetConfigOption(String name,
                             String description,
                             Set<String> defaultValue,
                             boolean mandatory,
                             boolean requiresInit)
Method Detail

getValueTypeAsJavaString

public String getValueTypeAsJavaString()
Specified by:
getValueTypeAsJavaString in class ConfigOption<Set<String>>

getJavaImports

public SortedSet<String> getJavaImports()
Description copied from class: ConfigOption
TODO Method should be removed and a mapping table in ConfigJavaGenerator created instead. gets java imports

Overrides:
getJavaImports in class ConfigOption<Set<String>>
Returns:
Java imports.

isValidValue

public boolean isValidValue(Set<String> 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<Set<String>>
Parameters:
value - A value for the option.
Returns:
True if the value is valid and false otherwise.

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<Set<String>>
Parameters:
object - The object to check.
Returns:
True of the type is correct, false otherwise.

getValueFormatting

public String getValueFormatting(Set<String> value)
Description copied from class: ConfigOption
Get a formatted value to put into configuration file.

Specified by:
getValueFormatting in class ConfigOption<Set<String>>
Parameters:
value - Option value.
Returns:
A string to put into a conf file.


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2008 Jens Lehmann