# Class AbstractInputTableParameter<T>

java.lang.Object
uk.ac.starlink.task.Parameter<T>
uk.ac.starlink.ttools.task.AbstractInputTableParameter<T>

Direct Known Subclasses:
  `InputTableParameter, InputTablesParameter`

public abstract class AbstractInputTableParameter<T> extends uk.ac.starlink.task.Parameter<T>
Parameter used to select a table for input. This abstract superclass provides general facilities for input tables; there are concrete subclasses for single and multiple input table values.

Since:
  15 Sep 2006
Author:
  Mark Taylor

## Field Summary

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

`BY_NAME`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractInputTableParameter(String name, Class<T> clazz)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`InputFormatParameter`
`getFormatParameter()`
Returns the parameter which deals with input format.
`static String`
`getLocationFormList(InputFormatParameter fmtParam)`
Returns an XML list element enumerating the forms in which a single table may be specified.
`uk.ac.starlink.task.BooleanParameter`
`getStreamParameter()`
Returns the stream toggle parameter associated with this one.
`uk.ac.starlink.table.StarTable`
`makeTable(String loc, String fmt, boolean stream, uk.ac.starlink.table.StarTableFactory tfact)`
Reads a table given fixed values for the various parameters.
`protected uk.ac.starlink.table.StarTable`
`makeTable(uk.ac.starlink.task.Environment env, String loc)`
Constructs a StarTable from a location string given the current state of this parameter and its associated parameter values.
`protected uk.ac.starlink.table.StarTable[]`
`makeTables(uk.ac.starlink.task.Environment env, String loc)`
Constructs an array of tables from a location string given the current state of this parameter and its associated parameter values.
`final void`
`setTableDescription(String inDescrip)`
Sets the wording used to refer to the input table in parameter descriptions.

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

`clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getUsage, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, setValue, setValueFromObject, setValueFromString, stringToObject, stringValue, toArray, toString`

### Methods inherited from class Object

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

## Constructor Details

### AbstractInputTableParameter

protected AbstractInputTableParameter(String name, Class<T> clazz)
Constructor.

Parameters:
  `name` - parameter name

## Method Details

### getFormatParameter

public InputFormatParameter getFormatParameter()
Returns the parameter which deals with input format.

Returns:
  format parameter

### getStreamParameter

public uk.ac.starlink.task.BooleanParameter getStreamParameter()
Returns the stream toggle parameter associated with this one.

Returns:
  stream parameter

### setTableDescription

public final void setTableDescription(String inDescrip)
Sets the wording used to refer to the input table in parameter descriptions. This parameter and the associated parameters (format and stream) are affected. If not set, the wording "the input table" is used.

Parameters:
  `inDescrip` - text to replace "the input table"

### makeTable

protected uk.ac.starlink.table.StarTable makeTable(uk.ac.starlink.task.Environment env, String loc) throws uk.ac.starlink.task.TaskException
Constructs a StarTable from a location string given the current state of this parameter and its associated parameter values.

Parameters:
  `env` - execution environment
  `loc` - table location string
Returns:
  table at loc
Throws:
  `uk.ac.starlink.task.TaskException`

### makeTable

public uk.ac.starlink.table.StarTable makeTable(String loc, String fmt, boolean stream, uk.ac.starlink.table.StarTableFactory tfact) throws IOException, uk.ac.starlink.task.TaskException
Reads a table given fixed values for the various parameters.

Parameters:
  `loc` - table location
  `fmt` - input format string
  `stream` - true for streamed input
  `tfact` - table factory
Returns:
  table loaded
Throws:
  `IOException`
  `uk.ac.starlink.task.TaskException`

### makeTables

protected uk.ac.starlink.table.StarTable[] makeTables(uk.ac.starlink.task.Environment env, String loc) throws uk.ac.starlink.task.TaskException
Constructs an array of tables from a location string given the current state of this parameter and its associated parameter values. The returned number of tables may only be plural if the table format is capable of supplying multiple tables.

Parameters:
  `env` - execution environment
  `loc` - table location string
Returns:
  tables at loc
Throws:
  `uk.ac.starlink.task.TaskException`

### getLocationFormList

public static String getLocationFormList(InputFormatParameter fmtParam)
Returns an XML list element enumerating the forms in which a single table may be specified.

Parameters:
  `fmtParam` - associated input format parameter
Returns:
  ul element