Class StringConfigKey
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<String>
uk.ac.starlink.ttools.plot2.config.StringConfigKey
Config key for use with String values.
- Since:
- 23 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstructs a graphical control with which the user can specify a suitable value for association with this key.stringToValue
(String txt) Decodes a string value to the value type of this key.valueToString
(String value) Reports a value as a string.Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
-
Constructor Details
-
StringConfigKey
Constructor.- Parameters:
meta
- metadatadflt
- default value
-
-
Method Details
-
stringToValue
Description copied from class:ConfigKey
Decodes a string value to the value type of this key. An empty string should be interpreted as a null value, but this may cause an exception if null is not a permissible value for this key.- Specified by:
stringToValue
in classConfigKey<String>
- Parameters:
txt
- string representation of value- Returns:
- value
-
valueToString
Description copied from class:ConfigKey
Reports a value as a string. If at all possible the roundtripping should be possible, sostringToValue(valueToString(v)).equals(v)
. A null value, if permitted, should be represented as an empty string.- Specified by:
valueToString
in classConfigKey<String>
- Parameters:
value
- possible value associated with this key- Returns:
- string representation
-
createSpecifier
Description copied from class:ConfigKey
Constructs a graphical control with which the user can specify a suitable value for association with this key.- Specified by:
createSpecifier
in classConfigKey<String>
- Returns:
- new specifier
-