Class CmdLineParser
java.lang.Object
com.openstego.desktop.util.cmd.CmdLineParser
Utility to parse the command line parameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethod to get the list of non-standard optionsint
Method to get the total number of options (standard plus non-standard) provided in the command-linegetOptionName
(int index) Method to get the name of the option by indexgetOptionValue
(String name) Method to get the value of the given option (by name)Get method for parsedOptionsMethod to get the list of standard optionsboolean
isValid()
Method to check whether the command-line options are valid or not.
-
Constructor Details
-
CmdLineParser
Default constructor- Parameters:
stdOptions
- List of standard optionsargs
- Command line arguments
-
-
Method Details
-
isValid
public boolean isValid()Method to check whether the command-line options are valid or not. This should be called immediately after the constructor is called.- Returns:
- Flag to indicate whether options are valid or not
-
getOptionValue
-
getOptionName
Method to get the name of the option by index- Parameters:
index
- Index of the option- Returns:
- Name of the command-line option
-
getParsedOptionsAsList
Method to get the list of standard options- Returns:
- List of standard options
-
getNonStdOptions
-
getParsedOptions
-
getNumOfOptions
public int getNumOfOptions()Method to get the total number of options (standard plus non-standard) provided in the command-line- Returns:
- Total number of options provided in the command-line
-