public class CombinationConfigKey extends ConfigKey<boolean[]>
Typically this is used for axes.
| Constructor and Description |
|---|
CombinationConfigKey(ConfigMeta meta,
boolean[] dflt,
String[] optNames,
String nullLabel)
Constructs an instance with a specified default.
|
CombinationConfigKey(ConfigMeta meta,
String[] optNames)
Constructs an instance where all the default inclusion flags are true
and a null value is not permitted.
|
| 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.
|
int |
optCharToIndex(char c)
Gets the option index from an initial character.
|
char |
optIndexToChar(int io)
Gets the initial letter from the option index.
|
boolean[] |
stringToValue(String txt)
Decodes a string value to the value type of this key.
|
String |
valueToString(boolean[] opts)
Reports a value as a string.
|
cast, getDefaultValue, getMeta, getValueClass, toStringpublic CombinationConfigKey(ConfigMeta meta, boolean[] dflt, String[] optNames, String nullLabel)
meta - metadatadflt - default array of selection flagsoptNames - labels for each of the options that may be selected,
same length as dfltnullLabel - label for a specifer option indicating the null
value; null is a permitted value only if this
parameter is non-nullpublic CombinationConfigKey(ConfigMeta meta, String[] optNames)
meta - metadataoptNames - labels for each of the options that may be selected,public boolean[] stringToValue(String txt) throws ConfigException
ConfigKeystringToValue in class ConfigKey<boolean[]>txt - string representation of valueConfigExceptionpublic String valueToString(boolean[] opts)
ConfigKeystringToValue(valueToString(v)).equals(v).
A null value, if permitted, should be represented as an empty string.valueToString in class ConfigKey<boolean[]>opts - possible value associated with this keypublic Specifier<boolean[]> createSpecifier()
ConfigKeycreateSpecifier in class ConfigKey<boolean[]>public int optCharToIndex(char c)
throws ConfigException
c - label character, case unimportantConfigException - if no index is indicated (unknown letter)public char optIndexToChar(int io)
io - option indexCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.