org.eclipse.ocl.common.preferences
Interface PreferenceableOption<T>

Type Parameters:
T - the type of the option's value
All Known Implementing Classes:
BooleanOption, BooleanPreference, ClassOption, ClassPreference, EnumeratedOption, EnumerationPreference, ObjectOption, Preference, ProblemOption, StringPreference, VirtualDelegateMapping

public interface PreferenceableOption<T>

A PreferenceableOption identifies a configurable behavior suitable for use in a Preference or Property Page.

The behavior is identified by a key and has a value with a type T and a defaultValue.

The value may be persisted as a string and reconstructed by #getValueOf().


Method Summary
 T getDefaultValue()
          Obtains the option's default value.
 java.lang.String getKey()
          Obtains my string key, which may be used for persistence in a preference store.
 java.lang.String getPluginId()
          Returns the plugin qualifier for the key.
 T getValueOf(java.lang.String string)
          Returns an option value from a String typically obtained from an Eclipse Preference file.
 

Method Detail

getDefaultValue

T getDefaultValue()
Obtains the option's default value.

Returns:
my default value, which default-default is null

getKey

java.lang.String getKey()
Obtains my string key, which may be used for persistence in a preference store.

Returns:
my key. Is never null

getPluginId

java.lang.String getPluginId()
Returns the plugin qualifier for the key.


getValueOf

T getValueOf(java.lang.String string)
Returns an option value from a String typically obtained from an Eclipse Preference file.