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 protected
TypedPreferenceValues(IPreferenceValues delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ITypedPreferenceValues
castOrWrap(IPreferenceValues values)
IPreferenceValues
getDelegate()
java.lang.String
getPreference(PreferenceKey key)
<T> T
getPreference(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:
getPreference
in 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:
getPreference
in 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()
-
-