- 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 StringgetOptionName()booleanisEndOptions()booleanisLongOption()booleanisOption()booleanisShortOption()booleanisValue()-
Methods inherited from class io.github.mmm.cli.CliArgument
get, getNext, getNextOption, getNextValue, getValue, getValues, toString
-
-
-
-
Method Detail
-
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".
-
isValue
public boolean isValue()
- Specified by:
isValuein classCliArgument- Returns:
trueif thisCliArgumentis aCliValue,falseotherwise (if it is aCliOption).
-
isOption
public boolean isOption()
- Specified by:
isOptionin classCliArgument- Returns:
trueif thisCliArgumentis aCliOption(e.g. "-h" or "--help"),falseotherwise (if it is aCliValue).
-
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.
-
isEndOptions
public boolean isEndOptions()
- Specified by:
isEndOptionsin classCliArgument- Returns:
trueifCliArgument.END_OPTIONSwas detected,falseotherwise. IfCliArgument.END_OPTIONSis parsed for the first time, it will be skipped, all following arguments will be parsed asCliValueno matter if they start with hyphen ('-') or not and will returntruefor this method.
-
-