Package org.eclipse.xtext.preferences
Class TypedPreferenceKey<T>
- java.lang.Object
-
- org.eclipse.xtext.preferences.PreferenceKey
-
- org.eclipse.xtext.preferences.TypedPreferenceKey<T>
-
- Direct Known Subclasses:
BooleanKey,EnumKey,IntegerKey,StringKey
public abstract class TypedPreferenceKey<T> extends PreferenceKey
Typed extension topreference keys- Since:
- 2.26
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypedPreferenceKey(java.lang.String id, java.lang.String defaultValue)Constructor that uses the internal representation of the default value.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.StringtoString(T value)Convert the given value to its string representation.abstract TtoValue(java.lang.String string)Convert the given string to its type-safe value.-
Methods inherited from class org.eclipse.xtext.preferences.PreferenceKey
equals, getDefaultValue, getId, hashCode, toString
-
-
-
-
Method Detail
-
toString
public abstract java.lang.String toString(T value)
Convert the given value to its string representation. A null value is converted to a null string.
-
toValue
public abstract T toValue(java.lang.String string)
Convert the given string to its type-safe value. The null string is converted to the null value.- Throws:
java.lang.IllegalArgumentException- if the given string is not a valid representation.
-
-