Class CeaParameter
java.lang.Object
uk.ac.starlink.ttools.cea.CeaParameter
Represents a parameter of a CEA task.
- Since:
- 17 Mar 2006
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of this parameter if there is one.Returns this parameter's description.getName()Returns this parameter's name.String[]Returns an array of permitted options if there is one.Returns a one-line summary of this parameter's purpose.getType()Returns the CEA type (CmdLineParameterDef/type) of this parameter.booleanisMulti()Returns whether this parameter can be specified multiple times on the command line.booleanReturns whether null is a permitted value for this parameter.booleanisOutput()Returns whether this parameter is an output parameter in the CEA sense.booleanisRef()Returns whether this parameter is a CEA 'reference' parameter (points to a file).voidsetOutput(boolean isOutput) voidsetRef(boolean isRef) voidTruncates this parameter's description to its first sentence.
-
Constructor Details
-
CeaParameter
public CeaParameter(uk.ac.starlink.task.Parameter<?> taskParam) Constructor.- Parameters:
taskParam- parameter within the ttools/task parameter system
-
-
Method Details
-
getName
-
getDescription
-
getSummary
-
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
Returns the default value of this parameter if there is one.- Returns:
- default value, or null
-
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.
-