- java.lang.Object
-
- io.github.mmm.cli.CliArgument
-
- io.github.mmm.cli.CliOption
-
- io.github.mmm.cli.CliLongOption
-
-
Field Summary
-
Fields inherited from class io.github.mmm.cli.CliArgument
END_OPTIONS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetOptionName()booleanisLongOption()booleanisShortOption()-
Methods inherited from class io.github.mmm.cli.CliOption
isAssignment, isEndOptions, isOption, isValue
-
Methods inherited from class io.github.mmm.cli.CliArgument
get, getNext, getNextOption, getNextValue, getValue, getValues, toString
-
-
-
-
Method Detail
-
isLongOption
public boolean isLongOption()
- Specified by:
isLongOptionin classCliArgument- Returns:
trueif thisCliArgumentis aCliLongOption(e.g. "--help"),falseotherwise.
-
isShortOption
public boolean isShortOption()
- Specified by:
isShortOptionin classCliArgument- Returns:
trueif thisCliArgumentis aCliShortOption(e.g. "-h"),falseotherwise.
-
getOptionName
public String 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".
-
-