uk.ac.starlink.ttools.task
Class DefaultMultiParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter
      extended by 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

Constructor Summary
DefaultMultiParameter(String name, char valueSep)
          Constructor.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMultiParameter

public DefaultMultiParameter(String name,
                             char valueSep)
Constructor.

Parameters:
name - parameter name
valueSep - value separator character
Method Detail

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.