public class OptionSpec extends Object
- add syntax pattern parsing
Syntax patterns are similar to Java type signatures
F - float
I - int
L - long
S - string
B - boolean
+ - one or more
eg: "FIS+" takes a double, int, and one or more Strings
| Modifier and Type | Field and Description |
|---|---|
static int |
NARGS_ONE_OR_MORE |
static int |
NARGS_ZERO_OR_MORE |
static int |
NARGS_ZERO_OR_ONE |
static String |
OPTION_FREE_ARGS |
| Constructor and Description |
|---|
OptionSpec(String optName) |
OptionSpec(String optName,
int nAllowed) |
OptionSpec(String optName,
String _syntaxPattern) |
| Modifier and Type | Method and Description |
|---|---|
String |
getArgDesc() |
String |
getDocDesc() |
int |
getNumOptions() |
Option |
getOption(int i) |
Iterator |
getOptions() |
boolean |
hasOption() |
void |
setDoc(String _argDoc,
String docLine) |
public static final int NARGS_ZERO_OR_MORE
public static final int NARGS_ONE_OR_MORE
public static final int NARGS_ZERO_OR_ONE
public static final String OPTION_FREE_ARGS
public OptionSpec(String optName)
public OptionSpec(String optName, int nAllowed)
Copyright © 2015. All rights reserved.