Package weka.core
Class Settings.SettingKey
java.lang.Object
weka.core.Settings.SettingKey
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Settings
Class implementing a key for a setting. Has a unique key, description, tool
tip text and map of arbitrary other metadata
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct a new empty setting keySettingKey
(String key, String description, String toolTip) Construct a new SettingKey with the given key, description and tool tip textConstruct a new SettingKey with the given key, description, tool tip and pick list -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares two setting keys for equalityGet the description (display name) of this settinggetKey()
Get the key of this settingGet the metadata for this settinggetMetadataElement
(String key) Get a piece of metadata for this settinggetMetadataElement
(String key, String defaultValue) Get a peice of metadata for this settingGet the optional pick list for the settingGet the tool tip text for this settingint
hashCode()
Hashcode based on the keyvoid
setDescription
(String description) Set the description (display name) of this settingvoid
set the key of this settingvoid
setMetadata
(Map<String, String> metadata) Set the metadata for this settingvoid
setMetadataElement
(String key, String value) Set the value of a piece of metadata for this settingvoid
setPickList
(List<String> pickList) Set the optional pick list for the settingvoid
setToolTip
(String toolTip) Set the tool tip text for this settingtoString()
Return the description (display name) of this setting
-
Constructor Details
-
SettingKey
public SettingKey()Construct a new empty setting key -
SettingKey
Construct a new SettingKey with the given key, description and tool tip text- Parameters:
key
- the key of this SettingKeydescription
- the description (display name of the setting)toolTip
- the tool tip text for the setting
-
SettingKey
Construct a new SettingKey with the given key, description, tool tip and pick list- Parameters:
key
- the key of this SettingKeydescription
- the description (display name of the setting)toolTip
- the tool tip for the settingpickList
- an optional list of legal values for a string setting
-
-
Method Details
-
setKey
set the key of this setting- Parameters:
key
- the key to use
-
getKey
Get the key of this setting- Returns:
- the key of this setting
-
setDescription
Set the description (display name) of this setting- Parameters:
description
- the description of this setting
-
getDescription
Get the description (display name) of this setting- Returns:
- the description of this setting
-
setToolTip
Set the tool tip text for this setting- Parameters:
toolTip
- the tool tip text to use
-
getToolTip
Get the tool tip text for this setting- Returns:
- the tool tip text to use
-
setMetadataElement
Set the value of a piece of metadata for this setting- Parameters:
key
- the key for the metadatavalue
- the value of the metadata
-
getMetadataElement
Get a piece of metadata for this setting- Parameters:
key
- the key of the metadata- Returns:
- the corresponding value, or null if the key is not known
-
getMetadataElement
Get a peice of metadata for this setting- Parameters:
key
- the key of the metadatadefaultValue
- the default value for the metadata- Returns:
- the corresponding value, or the default value if the key is not known
-
setMetadata
Set the metadata for this setting- Parameters:
metadata
- the metadata for this setting
-
getMetadata
Get the metadata for this setting- Returns:
- the metadata for this setting
-
getPickList
Get the optional pick list for the setting- Returns:
- the optional pick list for the setting (can be null if not applicable)
-
setPickList
Set the optional pick list for the setting- Parameters:
pickList
- the optional pick list for the setting (can be null if not applicable)
-
hashCode
public int hashCode()Hashcode based on the key -
equals
Compares two setting keys for equality -
toString
Return the description (display name) of this setting
-