Package org.eclipse.xtext.preferences
Class TypedPreferenceValues
- java.lang.Object
-
- org.eclipse.xtext.preferences.TypedPreferenceValues
-
- All Implemented Interfaces:
IPreferenceValues,ITypedPreferenceValues
public class TypedPreferenceValues extends java.lang.Object implements ITypedPreferenceValues
A typed wrapper around an existingpreference values instance.- Since:
- 2.26
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypedPreferenceValues(IPreferenceValues delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ITypedPreferenceValuescastOrWrap(IPreferenceValues values)IPreferenceValuesgetDelegate()java.lang.StringgetPreference(PreferenceKey key)<T> TgetPreference(TypedPreferenceKey<T> key)
-
-
-
Constructor Detail
-
TypedPreferenceValues
protected TypedPreferenceValues(IPreferenceValues delegate)
-
-
Method Detail
-
castOrWrap
public static ITypedPreferenceValues castOrWrap(IPreferenceValues values)
-
getDelegate
public IPreferenceValues getDelegate()
-
getPreference
public java.lang.String getPreference(PreferenceKey key)
- Specified by:
getPreferencein interfaceIPreferenceValues- Returns:
- the currently active value for the given preference or its default value, if no current value was explicitly defined.
- See Also:
PreferenceKey.getDefaultValue()
-
getPreference
public <T> T getPreference(TypedPreferenceKey<T> key)
- Specified by:
getPreferencein interfaceITypedPreferenceValues- Returns:
- the currently active value for the given preference or its default value, if no current value was explicitly defined.
- See Also:
PreferenceKey.getDefaultValue()
-
-