public class CommandLineOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
optionValue |
Constructor and Description |
---|
CommandLineOptions(java.lang.String[] args)
Parses an array of command line arguments for the options and their values
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsOption(java.lang.String option)
Returns whether the queried opton is set.
|
java.util.List<java.lang.String> |
getOptionsStartingWithName(java.lang.String optionPrefix)
Returns the list of options whose name starts with the given option prefix.
|
java.lang.String |
optionValue(java.lang.String option)
Returns the value of the queried option.
|
public CommandLineOptions(java.lang.String[] args)
args
- the command line arguments passed to a main method.public boolean containsOption(java.lang.String option)
option
- the option to check for.public java.lang.String optionValue(java.lang.String option)
option
- the option to get the value for.public java.util.List<java.lang.String> getOptionsStartingWithName(java.lang.String optionPrefix)
optionPrefix
- the option prefix that the returned options will contain