- java.lang.Object
-
- io.github.mmm.cli.CliArgument
-
- io.github.mmm.cli.CliOption
-
- io.github.mmm.cli.CliShortOption
-
-
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 String
getOptionName()
boolean
isLongOption()
boolean
isShortOption()
-
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
-
isShortOption
public boolean isShortOption()
- Specified by:
isShortOption
in classCliArgument
- Returns:
true
if thisCliArgument
is aCliShortOption
(e.g. "-h"),false
otherwise.
-
isLongOption
public boolean isLongOption()
- Specified by:
isLongOption
in classCliArgument
- Returns:
true
if thisCliArgument
is aCliLongOption
(e.g. "--help"),false
otherwise.
-
getOptionName
public String getOptionName()
- Specified by:
getOptionName
in classCliArgument
- Returns:
- the name of a
CliOption
ornull
if not anoption
(in case of aCliValue
). For theCliShortOption
"-h" this method will return "h", and forCliLongOption
"--help" it will return "help".
-
-