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

Type Parameters:
T - the type of the option's value
All Known Subinterfaces:
PreferenceableOption.PreferenceableOption2<T>
All Known Implementing Classes:
BooleanOption, BooleanPreference, ClassOption, ClassPreference, EnumeratedOption, EnumerationPreference, ObjectOption, OCLDelegateDomain.PivotOnlyVirtualDelegateMapping, 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(String).


Nested Class Summary
static interface PreferenceableOption.Listener
          A Listener may be added to a PreferenceableOption2 and notified of changes in the option.
static interface PreferenceableOption.PreferenceableOption2<T>
          The extended PreferenceableOption identifies a configurable behavior suitable for use in a Preference or Property Page.
 
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

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

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

getKey

@NonNull
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

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


getValueOf

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