public class ConfigParameter<T>
extends uk.ac.starlink.task.Parameter<T>
Constructor and Description |
---|
ConfigParameter(ConfigKey<T> key)
Constructs an un-suffixed config parameter.
|
Modifier and Type | Method and Description |
---|---|
static <T> ConfigParameter<T> |
createConfigParameter(ConfigKey<T> key)
Returns a ConfigParameter based on the given key.
|
static <T> ConfigParameter<T> |
createLayerSuffixedParameter(ConfigKey<T> key,
String layerSuffix,
boolean hasSuffixDetail)
Returns a layer-indexed config parameter with a given layer suffix.
|
static <T> ConfigParameter<T> |
createZoneSuffixedParameter(ConfigKey<T> key,
String zoneSuffix,
boolean hasSuffixDetail)
Returns a zone-indexed config parameter with a given zone suffix.
|
String |
objectToString(uk.ac.starlink.task.Environment env,
T objval) |
void |
setDefaultOption(T dflt)
Sets the typed default value for this parameter.
|
T |
stringToObject(uk.ac.starlink.task.Environment env,
String stringval) |
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getUsage, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString
public T stringToObject(uk.ac.starlink.task.Environment env, String stringval) throws uk.ac.starlink.task.TaskException
stringToObject
in class uk.ac.starlink.task.Parameter<T>
uk.ac.starlink.task.TaskException
public String objectToString(uk.ac.starlink.task.Environment env, T objval)
objectToString
in class uk.ac.starlink.task.Parameter<T>
public void setDefaultOption(T dflt)
dflt
- typed default valuepublic static <T> ConfigParameter<T> createConfigParameter(ConfigKey<T> key)
key
- config keypublic static <T> ConfigParameter<T> createLayerSuffixedParameter(ConfigKey<T> key, String layerSuffix, boolean hasSuffixDetail)
key
- config keylayerSuffix
- suffix part of namehasSuffixDetail
- if true, adds additional description about
layer suffix usagepublic static <T> ConfigParameter<T> createZoneSuffixedParameter(ConfigKey<T> key, String zoneSuffix, boolean hasSuffixDetail)
key
- config keyzoneSuffix
- suffix part of namehasSuffixDetail
- if true, adds additional description about
zone suffix usageCopyright © 2022 Central Laboratory of the Research Councils. All Rights Reserved.