| Modifier | Constructor and Description |
|---|---|
protected |
DoubleConfigKey(ConfigMeta meta,
double dflt)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static DoubleConfigKey |
createSliderKey(ConfigMeta meta,
double dflt,
double lo,
double hi,
boolean log)
Returns a key with a linear or logarithmic slider for a specifier.
|
static DoubleConfigKey |
createSliderKey(ConfigMeta meta,
double dflt,
double lo,
double hi,
boolean log,
boolean flip,
SliderSpecifier.TextOption txtOpt)
Returns a key with a linear or logarithmic slider for a specifier,
more options available.
|
static DoubleConfigKey |
createTextKey(ConfigMeta meta)
Constructs a key with a text field specifier and default NaN.
|
static DoubleConfigKey |
createTextKey(ConfigMeta meta,
double dflt)
Constructs a key with a text field specifier and an explicit default.
|
static DoubleConfigKey |
createToggleKey(ConfigMeta meta,
double fval,
double tval)
Returns a key with a specifier that only provides a
toggle between two values.
|
static String |
doubleToString(double dval)
Returns a string representation of a double value.
|
static double |
stringToDouble(String txt,
ConfigKey<?> key)
Interprets the value of a string as a double precision number.
|
Double |
stringToValue(String txt)
Decodes a string value to the value type of this key.
|
String |
valueToString(Double value)
Reports a value as a string.
|
cast, createSpecifier, getDefaultValue, getMeta, getValueClass, toStringprotected DoubleConfigKey(ConfigMeta meta, double dflt)
meta - metadatadflt - default valuepublic String valueToString(Double value)
ConfigKeystringToValue(valueToString(v)).equals(v).
A null value, if permitted, should be represented as an empty string.valueToString in class ConfigKey<Double>value - possible value associated with this keypublic Double stringToValue(String txt) throws ConfigException
ConfigKeystringToValue in class ConfigKey<Double>txt - string representation of valueConfigExceptionpublic static DoubleConfigKey createTextKey(ConfigMeta meta)
meta - metadatapublic static DoubleConfigKey createTextKey(ConfigMeta meta, double dflt)
meta - metadatadflt - default valuepublic static DoubleConfigKey createToggleKey(ConfigMeta meta, double fval, double tval)
meta - metadatafval - value for toggle false (default)tval - value for toggle truepublic static DoubleConfigKey createSliderKey(ConfigMeta meta, double dflt, double lo, double hi, boolean log)
meta - metadatadflt - default valuelo - slider lower boundhi - slider upper boundlog - true for logarithmic slider scale, false for linearpublic static DoubleConfigKey createSliderKey(ConfigMeta meta, double dflt, double lo, double hi, boolean log, boolean flip, SliderSpecifier.TextOption txtOpt)
meta - metadatadflt - default valuelo - slider lower boundhi - slider upper boundlog - true for logarithmic slider scale, false for linearflip - true to make slider values increase right to lefttxtOpt - configures whether a text field should appear;
null means NONEpublic static String doubleToString(double dval)
dval - double value, may be NaNpublic static double stringToDouble(String txt, ConfigKey<?> key) throws ConfigException
txt - string, may be nullkey - reference key, used for error reportingConfigException - for non-numeric stringsCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.