weka.core

## Class Settings.SettingKey

- java.lang.Object
- - weka.core.Settings.SettingKey

- All Implemented Interfaces:
    java.io.Serializable
  Enclosing class:
    Settings

      public static class Settings.SettingKey
      extends java.lang.Object
      implements java.io.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 and Description
    `SettingKey()` Construct a new empty setting key
    `SettingKey(java.lang.String key, java.lang.String description, java.lang.String toolTip)` Construct a new SettingKey with the given key, description and tool tip text
    `SettingKey(java.lang.String key, java.lang.String description, java.lang.String toolTip, java.util.List<java.lang.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 and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)` Compares two setting keys for equality
    `java.lang.String` | `getDescription()` Get the description (display name) of this setting
    `java.lang.String` | `getKey()` Get the key of this setting
    `java.util.Map<java.lang.String,java.lang.String>` | `getMetadata()` Get the metadata for this setting
    `java.lang.String` | `getMetadataElement(java.lang.String key)` Get a piece of metadata for this setting
    `java.lang.String` | `getMetadataElement(java.lang.String key, java.lang.String defaultValue)` Get a peice of metadata for this setting
    `java.util.List<java.lang.String>` | `getPickList()` Get the optional pick list for the setting
    `java.lang.String` | `getToolTip()` Get the tool tip text for this setting
    `int` | `hashCode()` Hashcode based on the key
    `void` | `setDescription(java.lang.String description)` Set the description (display name) of this setting
    `void` | `setKey(java.lang.String key)` set the key of this setting
    `void` | `setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)` Set the metadata for this setting
    `void` | `setMetadataElement(java.lang.String key, java.lang.String value)` Set the value of a piece of metadata for this setting
    `void` | `setPickList(java.util.List<java.lang.String> pickList)` Set the optional pick list for the setting
    `void` | `setToolTip(java.lang.String toolTip)` Set the tool tip text for this setting
    `java.lang.String` | `toString()` Return the description (display name) of this setting

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SettingKey

          public SettingKey()

      Construct a new empty setting key

    - #### SettingKey

          public SettingKey(java.lang.String key,
                            java.lang.String description,
                            java.lang.String toolTip)

      Construct a new SettingKey with the given key, description and tool tip text
      Parameters:
        `key` - the key of this SettingKey
        `description` - the description (display name of the setting)
        `toolTip` - the tool tip text for the setting

    - #### SettingKey

          public SettingKey(java.lang.String key,
                            java.lang.String description,
                            java.lang.String toolTip,
                            java.util.List<java.lang.String> pickList)

      Construct a new SettingKey with the given key, description, tool tip and pick list
      Parameters:
        `key` - the key of this SettingKey
        `description` - the description (display name of the setting)
        `toolTip` - the tool tip for the setting
        `pickList` - an optional list of legal values for a string setting

  - ### Method Detail

    - #### setKey

          public void setKey(java.lang.String key)

      set the key of this setting
      Parameters:
        `key` - the key to use

    - #### getKey

          public java.lang.String getKey()

      Get the key of this setting
      Returns:
        the key of this setting

    - #### setDescription

          public void setDescription(java.lang.String description)

      Set the description (display name) of this setting
      Parameters:
        `description` - the description of this setting

    - #### getDescription

          public java.lang.String getDescription()

      Get the description (display name) of this setting
      Returns:
        the description of this setting

    - #### setToolTip

          public void setToolTip(java.lang.String toolTip)

      Set the tool tip text for this setting
      Parameters:
        `toolTip` - the tool tip text to use

    - #### getToolTip

          public java.lang.String getToolTip()

      Get the tool tip text for this setting
      Returns:
        the tool tip text to use

    - #### setMetadataElement

          public void setMetadataElement(java.lang.String key,
                                         java.lang.String value)

      Set the value of a piece of metadata for this setting
      Parameters:
        `key` - the key for the metadata
        `value` - the value of the metadata

    - #### getMetadataElement

          public java.lang.String getMetadataElement(java.lang.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 java.lang.String getMetadataElement(java.lang.String key,
                                                     java.lang.String defaultValue)

      Get a peice of metadata for this setting
      Parameters:
        `key` - the key of the metadata
        `defaultValue` - the default value for the metadata
      Returns:
        the corresponding value, or the default value if the key is not known

    - #### setMetadata

          public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)

      Set the metadata for this setting
      Parameters:
        `metadata` - the metadata for this setting

    - #### getMetadata

          public java.util.Map<java.lang.String,java.lang.String> getMetadata()

      Get the metadata for this setting
      Returns:
        the metadata for this setting

    - #### getPickList

          public java.util.List<java.lang.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(java.util.List<java.lang.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
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        the hashcode of this setting

    - #### equals

          public boolean equals(java.lang.Object other)

      Compares two setting keys for equality
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `other` - the other setting key to compare to
      Returns:
        true if this setting key is equal to the supplied one

    - #### toString

          public java.lang.String toString()

      Return the description (display name) of this setting
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the description of this setting