# Class StringMultiParameter

java.lang.Object
uk.ac.starlink.task.Parameter<String[]>
uk.ac.starlink.ttools.task.StringMultiParameter

All Implemented Interfaces:
  `uk.ac.starlink.task.MultiParameter`

public class StringMultiParameter extends uk.ac.starlink.task.Parameter<String[]> implements uk.ac.starlink.task.MultiParameter
Convenience parameter subclass for getting a sequence of string values.

Since:
  13 Oct 2008
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class uk.ac.starlink.task.Parameter

`BY_NAME`

## Constructor Summary

Constructors
Constructor
Description
`StringMultiParameter(String name, char valueSep)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`char`
`getValueSeparator()`
`String`
`objectToString(uk.ac.starlink.task.Environment env, String[] objVal)`
`String[]`
`stringsValue(uk.ac.starlink.task.Environment env)`
Returns the values of this parameter as an array.
`String[]`
`stringToObject(uk.ac.starlink.task.Environment env, String stringVal)`

### Methods inherited from class uk.ac.starlink.task.Parameter

`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`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### StringMultiParameter

public StringMultiParameter(String name, char valueSep)
Constructor.

Parameters:
  `name` - parameter name
  `valueSep` - value separator character

## Method Details

### getValueSeparator

public char getValueSeparator()

Specified by:
  `getValueSeparator` in interface `uk.ac.starlink.task.MultiParameter`

### stringsValue

public String[] stringsValue(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.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:
  `uk.ac.starlink.task.TaskException`

### stringToObject

public String[] stringToObject(uk.ac.starlink.task.Environment env, String stringVal)

Specified by:
  `stringToObject` in class `uk.ac.starlink.task.Parameter<String[]>`

### objectToString

public String objectToString(uk.ac.starlink.task.Environment env, String[] objVal) throws uk.ac.starlink.task.TaskException

Overrides:
  `objectToString` in class `uk.ac.starlink.task.Parameter<String[]>`
Throws:
  `uk.ac.starlink.task.TaskException`