uk.ac.starlink.ttools.task
Class DefaultMultiParameter
java.lang.Object
uk.ac.starlink.task.Parameter
uk.ac.starlink.ttools.task.DefaultMultiParameter
- All Implemented Interfaces:
- MultiParameter
public class DefaultMultiParameter
- extends Parameter
- implements MultiParameter
Convenience parameter subclass which implements MultiParameter.
- Since:
- 13 Oct 2008
- Author:
- Mark Taylor
Method Summary |
char |
getValueSeparator()
Returns a character which is to be used as the separator between
values found in adjacent occurrences of the parameter in the
execution environment. |
String[] |
stringsValue(Environment env)
Returns the values of this parameter as an array. |
Methods inherited from class uk.ac.starlink.task.Parameter |
checkGotValue, clearValue, getDefault, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getUsage, isNullPermitted, setDefault, setDescription, setDescription, setGotValue, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringValue, setUsage, setValueFromString, stringValue, toString |
DefaultMultiParameter
public DefaultMultiParameter(String name,
char valueSep)
- Constructor.
- Parameters:
name
- parameter namevalueSep
- value separator character
getValueSeparator
public char getValueSeparator()
- Description copied from interface:
MultiParameter
- Returns a character which is to be used as the separator between
values found in adjacent occurrences of the parameter in the
execution environment.
- Specified by:
getValueSeparator
in interface MultiParameter
stringsValue
public String[] stringsValue(Environment env)
throws TaskException
- Returns the values of this parameter as an array.
If the value is null, an empty array is returned.
- Parameters:
env
- execution environment
- Returns:
- array of individual values
- Throws:
TaskException
Copyright © 2014 Central Laboratory of the Research Councils. All Rights Reserved.