Package de.dlr.proseo.ui.cli.parser
Class CLIParameter
java.lang.Object
de.dlr.proseo.ui.cli.parser.CLIParameter
Class representing a CLI command parameter
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the parameter's descriptiongetName()Gets the parameter's nameReturn whether the parameter is optionalReturn whether the parameter is repeatablegetType()Gets the parameter's typeprintHTML(StringBuilder htmlDoc) Appends the StringBuilder provided by the caller with HTML code that prints a table with the parameter's name and a description.voidsetDescription(String description) Sets the parameter's descriptionvoidSets the parameter's namevoidsetOptional(Boolean optional) Set whether the parameter is optionalvoidsetRepeatable(Boolean repeatable) Set whether the parameter is repeatablevoidSets the parameter's typetoString()Returns a String representation of the parameter
-
Constructor Details
-
CLIParameter
public CLIParameter()
-
-
Method Details
-
getName
Gets the parameter's name- Returns:
- the name
-
setName
Sets the parameter's name- Parameters:
name- the name to set
-
getType
Gets the parameter's type- Returns:
- the type
-
setType
Sets the parameter's type- Parameters:
type- the type to set
-
getDescription
Gets the parameter's description- Returns:
- the description
-
setDescription
Sets the parameter's description- Parameters:
description- the description to set
-
getOptional
Return whether the parameter is optional- Returns:
- true if the parameter is optional, false otherwise
-
setOptional
Set whether the parameter is optional- Parameters:
optional- true if the parameter is to be optional, false otherwise
-
getRepeatable
Return whether the parameter is repeatable- Returns:
- true if the parameter is repeatable, false otherwise
-
setRepeatable
Set whether the parameter is repeatable- Parameters:
repeatable- true if the parameter is to be repeatable, false otherwise
-
toString
Returns a String representation of the parameter -
printHTML
Appends the StringBuilder provided by the caller with HTML code that prints a table with the parameter's name and a description. If applicable, the parameter is marked as optional and/or repeatable.- Parameters:
htmlDoc- A StringBuilder that may already contain information.- Returns:
- The same StringBuilder, appended information on the option.
-