- java.lang.Object
-
- io.github.mmm.cli.CliArgument
-
- io.github.mmm.cli.CliValue
-
public class CliValue extends CliArgument
-
-
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
isEndOptions()
boolean
isLongOption()
boolean
isOption()
boolean
isShortOption()
boolean
isValue()
-
Methods inherited from class io.github.mmm.cli.CliArgument
get, getNext, getNextOption, getNextValue, getValue, getValues, toString
-
-
-
-
Method Detail
-
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".
-
isValue
public boolean isValue()
- Specified by:
isValue
in classCliArgument
- Returns:
true
if thisCliArgument
is aCliValue
,false
otherwise (if it is aCliOption
).
-
isOption
public boolean isOption()
- Specified by:
isOption
in classCliArgument
- Returns:
true
if thisCliArgument
is aCliOption
(e.g. "-h" or "--help"),false
otherwise (if it is aCliValue
).
-
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.
-
isEndOptions
public boolean isEndOptions()
- Specified by:
isEndOptions
in classCliArgument
- Returns:
true
ifCliArgument.END_OPTIONS
was detected,false
otherwise. IfCliArgument.END_OPTIONS
is parsed for the first time, it will be skipped, all following arguments will be parsed asCliValue
no matter if they start with hyphen ('-') or not and will returntrue
for this method.
-
-