Package weka.core
Class Settings.SettingKey
- java.lang.Object
-
- weka.core.Settings.SettingKey
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Settings
public static class Settings.SettingKey extends Object implements Serializable
Class implementing a key for a setting. Has a unique key, description, tool tip text and map of arbitrary other metadata- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SettingKey()Construct a new empty setting keySettingKey(String key, String description, String toolTip)Construct a new SettingKey with the given key, description and tool tip textSettingKey(String key, String description, String toolTip, List<String> pickList)Construct a new SettingKey with the given key, description, tool tip and pick list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Compares two setting keys for equalityStringgetDescription()Get the description (display name) of this settingStringgetKey()Get the key of this settingMap<String,String>getMetadata()Get the metadata for this settingStringgetMetadataElement(String key)Get a piece of metadata for this settingStringgetMetadataElement(String key, String defaultValue)Get a peice of metadata for this settingList<String>getPickList()Get the optional pick list for the settingStringgetToolTip()Get the tool tip text for this settinginthashCode()Hashcode based on the keyvoidsetDescription(String description)Set the description (display name) of this settingvoidsetKey(String key)set the key of this settingvoidsetMetadata(Map<String,String> metadata)Set the metadata for this settingvoidsetMetadataElement(String key, String value)Set the value of a piece of metadata for this settingvoidsetPickList(List<String> pickList)Set the optional pick list for the settingvoidsetToolTip(String toolTip)Set the tool tip text for this settingStringtoString()Return the description (display name) of this setting
-
-
-
Constructor Detail
-
SettingKey
public SettingKey()
Construct a new empty setting key
-
SettingKey
public SettingKey(String key, String description, String toolTip)
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
public SettingKey(String key, String description, String toolTip, List<String> pickList)
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 Detail
-
setKey
public void setKey(String key)
set the key of this setting- Parameters:
key- the key to use
-
getKey
public String getKey()
Get the key of this setting- Returns:
- the key of this setting
-
setDescription
public void setDescription(String description)
Set the description (display name) of this setting- Parameters:
description- the description of this setting
-
getDescription
public String getDescription()
Get the description (display name) of this setting- Returns:
- the description of this setting
-
setToolTip
public void setToolTip(String toolTip)
Set the tool tip text for this setting- Parameters:
toolTip- the tool tip text to use
-
getToolTip
public String getToolTip()
Get the tool tip text for this setting- Returns:
- the tool tip text to use
-
setMetadataElement
public void setMetadataElement(String key, String value)
Set the value of a piece of metadata for this setting- Parameters:
key- the key for the metadatavalue- the value of the metadata
-
getMetadataElement
public String getMetadataElement(String key)
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
public String getMetadataElement(String key, String defaultValue)
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
public void setMetadata(Map<String,String> metadata)
Set the metadata for this setting- Parameters:
metadata- the metadata for this setting
-
getMetadata
public Map<String,String> getMetadata()
Get the metadata for this setting- Returns:
- the metadata for this setting
-
getPickList
public List<String> getPickList()
Get the optional pick list for the setting- Returns:
- the optional pick list for the setting (can be null if not applicable)
-
setPickList
public void setPickList(List<String> pickList)
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
public boolean equals(Object other)
Compares two setting keys for equality
-
-