Package de.dlr.proseo.ui.cli.parser
Klasse CLIParameter
java.lang.Object
de.dlr.proseo.ui.cli.parser.CLIParameter
Class representing a CLI command parameter
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets 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.void
setDescription
(String description) Sets the parameter's descriptionvoid
Sets the parameter's namevoid
setOptional
(Boolean optional) Set whether the parameter is optionalvoid
setRepeatable
(Boolean repeatable) Set whether the parameter is repeatablevoid
Sets the parameter's typetoString()
Returns a String representation of the parameter
-
Konstruktordetails
-
CLIParameter
public CLIParameter()
-
-
Methodendetails
-
getName
Gets the parameter's name- Gibt zurück:
- the name
-
setName
Sets the parameter's name- Parameter:
name
- the name to set
-
getType
Gets the parameter's type- Gibt zurück:
- the type
-
setType
Sets the parameter's type- Parameter:
type
- the type to set
-
getDescription
Gets the parameter's description- Gibt zurück:
- the description
-
setDescription
Sets the parameter's description- Parameter:
description
- the description to set
-
getOptional
Return whether the parameter is optional- Gibt zurück:
- true if the parameter is optional, false otherwise
-
setOptional
Set whether the parameter is optional- Parameter:
optional
- true if the parameter is to be optional, false otherwise
-
getRepeatable
Return whether the parameter is repeatable- Gibt zurück:
- true if the parameter is repeatable, false otherwise
-
setRepeatable
Set whether the parameter is repeatable- Parameter:
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.- Parameter:
htmlDoc
- A StringBuilder that may already contain information.- Gibt zurück:
- The same StringBuilder, appended information on the option.
-