public class TimeConfigKey extends ConfigKey<java.lang.Double>
TimeMapper
, that is unix seconds.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORMAT_XML
XML <p> element describing the text input format.
|
Constructor and Description |
---|
TimeConfigKey(ConfigMeta meta)
Constructs a key with no default value.
|
TimeConfigKey(ConfigMeta meta,
double dfltUnixSeconds)
Constructs a key with a given default value.
|
Modifier and Type | Method and Description |
---|---|
Specifier<java.lang.Double> |
createSpecifier()
Constructs a graphical control with which the user can
specify a suitable value for association with this key.
|
java.lang.Double |
stringToValue(java.lang.String txt)
Decodes a string value to the value type of this key.
|
java.lang.String |
valueToString(java.lang.Double value)
Reports a value as a string.
|
cast, getDefaultValue, getMeta, getValueClass, toString
public static final java.lang.String FORMAT_XML
public TimeConfigKey(ConfigMeta meta)
meta
- metadatapublic TimeConfigKey(ConfigMeta meta, double dfltUnixSeconds)
meta
- metadatadfltUnixSeconds
- default value as seconds since Unix epochpublic java.lang.String valueToString(java.lang.Double value)
ConfigKey
stringToValue(valueToString(v)).equals(v)
.
A null value, if permitted, should be represented as an empty string.valueToString
in class ConfigKey<java.lang.Double>
value
- possible value associated with this keypublic java.lang.Double stringToValue(java.lang.String txt) throws ConfigException
ConfigKey
stringToValue
in class ConfigKey<java.lang.Double>
txt
- string representation of valueConfigException
public Specifier<java.lang.Double> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<java.lang.Double>
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.