java.lang.Object
io.github.mmm.cli.arg.CliArgument
io.github.mmm.cli.arg.CliOption
io.github.mmm.cli.arg.CliShortOption
CliOption in short format (e.g. "-h"). Will always be a hyphen ('-') followed by a single other character.- Since:
- 1.0.0
-
Field Summary
Fields inherited from class io.github.mmm.cli.arg.CliArgument
END_OPTIONS -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanMethods inherited from class io.github.mmm.cli.arg.CliOption
getValueType, isAssignment, isEndOptions, isOption, isValueMethods inherited from class io.github.mmm.cli.arg.CliArgument
get, getNext, getNextOption, getNextValue, getValue, getValues, toString
-
Method Details
-
isShortOption
public boolean isShortOption()- Specified by:
isShortOptionin classCliArgument- Returns:
trueif thisCliArgumentis aCliShortOption(e.g. "-h"),falseotherwise.
-
isLongOption
public boolean isLongOption()- Specified by:
isLongOptionin classCliArgument- Returns:
trueif thisCliArgumentis aCliLongOption(e.g. "--help"),falseotherwise.
-
getOptionName
- Specified by:
getOptionNamein classCliArgument- Returns:
- the name of a
CliOptionornullif not anoption(in case of aCliValue). For theCliShortOption"-h" this method will return "h", and forCliLongOption"--help" it will return "help".
-