uk.ac.starlink.ttools.task
Class InputTableParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter<T>
      extended by uk.ac.starlink.ttools.task.AbstractInputTableParameter<StarTable>
          extended by uk.ac.starlink.ttools.task.InputTableParameter

public class InputTableParameter
extends AbstractInputTableParameter<StarTable>

Parameter for specifying a single input table.

Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.task.Parameter
BY_NAME
 
Constructor Summary
InputTableParameter(String name)
          Constructor.
 
Method Summary
 String objectToString(Environment env, StarTable table)
          Takes a typed value of this parameter and formats it as a string which may be used for presentation to the user.
 StarTable stringToObject(Environment env, String sval)
          Returns the input table which has been selected by this parameter.
 StarTable tableValue(Environment env)
           
 
Methods inherited from class uk.ac.starlink.ttools.task.AbstractInputTableParameter
getFormatParameter, getLocationFormList, getStreamParameter, makeTable, makeTables, setTableDescription
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputTableParameter

public InputTableParameter(String name)
Constructor.

Parameters:
name - parameter name
Method Detail

stringToObject

public StarTable stringToObject(Environment env,
                                String sval)
                         throws TaskException
Returns the input table which has been selected by this parameter.

Specified by:
stringToObject in class Parameter<StarTable>
Parameters:
env - execution environment
sval - non-null, non-empty string value
Returns:
typed value
Throws:
TaskException

objectToString

public String objectToString(Environment env,
                             StarTable table)
Description copied from class: Parameter
Takes a typed value of this parameter and formats it as a string which may be used for presentation to the user. Ideally, round-tripping between this method and stringToObject should be possible, but that is not in general required/guaranteed.

The default implementation uses the value's toString method, but subclasses can override this for smarter behaviour.

Overrides:
objectToString in class Parameter<StarTable>
Parameters:
env - execution environment
table - typed parameter value
Returns:
string value for presentation

tableValue

public StarTable tableValue(Environment env)
                     throws TaskException
Throws:
TaskException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.