Constructor and Description |
---|
BooleanConfigKey(ConfigMeta meta)
Constructs a key with a false default.
|
BooleanConfigKey(ConfigMeta meta,
boolean dflt)
Constructs a key with explicit default.
|
Modifier and Type | Method and Description |
---|---|
Specifier<Boolean> |
createSpecifier()
Constructs a graphical control with which the user can
specify a suitable value for association with this key.
|
static boolean |
isFalse(String txt)
Indicates whether the given string represents the value False.
|
static boolean |
isTrue(String txt)
Indicates whether the given string represents the value True.
|
Boolean |
stringToValue(String txt)
Decodes a string value to the value type of this key.
|
String |
valueToString(Boolean value)
Reports a value as a string.
|
cast, getDefaultValue, getMeta, getValueClass, toString
public BooleanConfigKey(ConfigMeta meta, boolean dflt)
meta
- metadatadflt
- default valuepublic BooleanConfigKey(ConfigMeta meta)
meta
- metadatapublic Boolean stringToValue(String txt) throws ConfigException
ConfigKey
stringToValue
in class ConfigKey<Boolean>
txt
- string representation of valueConfigException
public String valueToString(Boolean value)
ConfigKey
stringToValue(valueToString(v)).equals(v)
.
A null value, if permitted, should be represented as an empty string.valueToString
in class ConfigKey<Boolean>
value
- possible value associated with this keypublic Specifier<Boolean> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<Boolean>
public static boolean isTrue(String txt)
txt
- stringpublic static boolean isFalse(String txt)
txt
- stringCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.