public class CmdLineOptions
extends java.lang.Object
CmdLineParser| Constructor and Description |
|---|
CmdLineOptions()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(CmdLineOption option)
Method to add the command-line option
|
void |
add(java.lang.String name,
java.lang.String altName,
int type,
boolean takesArg)
Overloaded method to add the command-line option
|
java.util.List<CmdLineOption> |
getList()
Method to get the list of the given options
|
CmdLineOption |
getOption(int index)
Method to get the standard option data by index
|
CmdLineOption |
getOption(java.lang.String name)
Method to get the standard option data by name
|
java.lang.String |
getOptionValue(java.lang.String name)
Method to get the value of the given option
|
int |
size()
Method to get the number of the given options
|
public void add(CmdLineOption option)
option - Command-line optionpublic void add(java.lang.String name,
java.lang.String altName,
int type,
boolean takesArg)
name - Name of the optionaltName - Alternate name of the optiontype - Type of the optiontakesArg - Flag to indicate whether the option takes argument or notpublic CmdLineOption getOption(java.lang.String name)
name - Name of the optionpublic CmdLineOption getOption(int index)
index - Index of the optionpublic java.lang.String getOptionValue(java.lang.String name)
name - Name of the optionpublic java.util.List<CmdLineOption> getList()
public int size()
Copyright © 2007-2021 Samir Vaidya. All Rights Reserved.