Package tigase.util.ui.console
Class CommandlineParameter
- java.lang.Object
-
- tigase.util.ui.console.CommandlineParameter
-
public class CommandlineParameter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandlineParameter.BuilderCreates aCommandlineParameterbuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Optional<String>getDefaultValue()Retrieves default value for this parameter optionOptional<String>getDescription()Retrieves description for this parameter optionOptional<String>getFullName()Retrieves full name for this parameter optionOptional<String>getFullName(boolean includeDash)Retrieves full name for this parameter optionOptional<List<String>>getSelectionOptions()Retrieves list of possible selection options for this parameter optionOptional<String>getSingleLetter()Retrieves single letter identification for this parameter optionOptional<String>getSingleLetter(boolean includeDash)Retrieves single letter identification for this parameter optionClassgetType()Retrives expected class of a parameterOptional<String>getValue()Retrieves stored value for this parameter optionList<CommandlineParameter>getValueDependentParameters()inthashCode()booleanhasValueDependentParameters()booleanisRequireArguments()Retrieves information whether this parameter option requires argumentsbooleanisRequired()Retrieves information whether this parameter option is requiredbooleanisSecret()Retrieves information whether this parameter option is secretvoidsetValue(String value)Sets value for this parameter optionvoidsetValueFromDefault()Sets the value from the configured default if presentStringtoString()StringtoStringSimple()
-
-
-
Method Detail
-
getDefaultValue
public Optional<String> getDefaultValue()
Retrieves default value for this parameter option- Returns:
- Optional for the default value
-
getDescription
public Optional<String> getDescription()
Retrieves description for this parameter option- Returns:
- Optional for the description
-
getFullName
public Optional<String> getFullName(boolean includeDash)
Retrieves full name for this parameter option- Parameters:
includeDash- controls whether dashes should be included- Returns:
- Optional for the full name (which may include dashes depending on parameter)
-
getFullName
public Optional<String> getFullName()
Retrieves full name for this parameter option- Returns:
- Optional for the full name
-
getSelectionOptions
public Optional<List<String>> getSelectionOptions()
Retrieves list of possible selection options for this parameter option- Returns:
- Optional list of the possible selection options
-
getSingleLetter
public Optional<String> getSingleLetter()
Retrieves single letter identification for this parameter option- Returns:
- Optional for the single letter
-
getSingleLetter
public Optional<String> getSingleLetter(boolean includeDash)
Retrieves single letter identification for this parameter option- Parameters:
includeDash- controls whether dash should be included- Returns:
- Optional for the single letter (which may include dash depending on parameter)
-
getType
public Class getType()
Retrives expected class of a parameter- Returns:
-
getValue
public Optional<String> getValue()
Retrieves stored value for this parameter option- Returns:
- Optional with the stored value
-
setValue
public void setValue(String value)
Sets value for this parameter option- Parameters:
value- to be set
-
getValueDependentParameters
public List<CommandlineParameter> getValueDependentParameters()
-
hasValueDependentParameters
public boolean hasValueDependentParameters()
-
isRequireArguments
public boolean isRequireArguments()
Retrieves information whether this parameter option requires arguments- Returns:
- true if the parameter option requires arguments
-
isRequired
public boolean isRequired()
Retrieves information whether this parameter option is required- Returns:
- true if the parameter option is required
-
isSecret
public boolean isSecret()
Retrieves information whether this parameter option is secret- Returns:
- true if the parameter option is secret
-
setValueFromDefault
public void setValueFromDefault()
Sets the value from the configured default if present
-
toStringSimple
public String toStringSimple()
-
-