# Class CeaParameter

java.lang.Object
uk.ac.starlink.ttools.cea.CeaParameter

public class CeaParameter extends Object
Represents a parameter of a CEA task.

Since:
  17 Mar 2006
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`CeaParameter(uk.ac.starlink.task.Parameter<?> taskParam)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getDefault()`
Returns the default value of this parameter if there is one.
`String`
`getDescription()`
Returns this parameter's description.
`String`
`getName()`
Returns this parameter's name.
`String[]`
`getOptions()`
Returns an array of permitted options if there is one.
`String`
`getSummary()`
Returns a one-line summary of this parameter's purpose.
`String`
`getType()`
Returns the CEA type (CmdLineParameterDef/type) of this parameter.
`boolean`
`isMulti()`
Returns whether this parameter can be specified multiple times on the command line.
`boolean`
`isNullPermitted()`
Returns whether null is a permitted value for this parameter.
`boolean`
`isOutput()`
Returns whether this parameter is an output parameter in the CEA sense.
`boolean`
`isRef()`
Returns whether this parameter is a CEA 'reference' parameter (points to a file).
`void`
`setOutput(boolean isOutput)`
`void`
`setRef(boolean isRef)`
`void`
`truncateDescription()`
Truncates this parameter's description to its first sentence.

### Methods inherited from class Object

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

## Constructor Details

### CeaParameter

public CeaParameter(uk.ac.starlink.task.Parameter<?> taskParam)
Constructor.

Parameters:
  `taskParam` - parameter within the ttools/task parameter system

## Method Details

### getName

public String getName()
Returns this parameter's name.

Returns:
  parameter name

### getDescription

public String getDescription()
Returns this parameter's description.

Returns:
  parameter description

### getSummary

public String getSummary()
Returns a one-line summary of this parameter's purpose.

Returns:
  summary

### getType

public String getType()
Returns the CEA type (CmdLineParameterDef/type) of this parameter.

Returns:
  CEA type

### isOutput

public boolean isOutput()
Returns whether this parameter is an output parameter in the CEA sense.

Returns:
  true iff this parameter is for output

### setOutput

public void setOutput(boolean isOutput)

### setRef

public void setRef(boolean isRef)

### isRef

public boolean isRef()
Returns whether this parameter is a CEA 'reference' parameter (points to a file).

Returns:
  true iff this is a file reference parameter

### isMulti

public boolean isMulti()
Returns whether this parameter can be specified multiple times on the command line.

Returns:
  true iff this parameter is multiple

### isNullPermitted

public boolean isNullPermitted()
Returns whether null is a permitted value for this parameter.

Returns:
  true iff null is legal

### getDefault

public String getDefault()
Returns the default value of this parameter if there is one.

Returns:
  default value, or null

### getOptions

public String[] getOptions()
Returns an array of permitted options if there is one.

Returns:
  array of sole permitted values, or null

### truncateDescription

public void truncateDescription()
Truncates this parameter's description to its first sentence. This is a hack which (with luck) has the effect of cutting out bits of the parameter description which are not relevant to CEA use.