Package org.locationtech.jtstest.command
Class OptionSpec
java.lang.Object
org.locationtech.jtstest.command.OptionSpec
Specifes the syntax for a single option on a
command line
ToDo:
- 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
- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOptionSpec
(String optName) OptionSpec
(String optName, int nAllowed) OptionSpec
(String optName, String _syntaxPattern) -
Method Summary
-
Field Details
-
NARGS_ZERO_OR_MORE
public static final int NARGS_ZERO_OR_MORE- See Also:
-
NARGS_ONE_OR_MORE
public static final int NARGS_ONE_OR_MORE- See Also:
-
NARGS_ZERO_OR_ONE
public static final int NARGS_ZERO_OR_ONE- See Also:
-
OPTION_FREE_ARGS
- See Also:
-
name
String name -
nAllowedArgs
int nAllowedArgs -
syntaxPattern
String syntaxPattern -
argDoc
String argDoc -
doc
String doc -
options
Vector options
-
-
Constructor Details
-
OptionSpec
-
OptionSpec
-
OptionSpec
-
-
Method Details
-
setDoc
-
getArgDesc
-
getDocDesc
-
getNumOptions
public int getNumOptions() -
getOption
-
getOptions
-
hasOption
public boolean hasOption() -
addOption
-
getName
String getName() -
getAllowedArgs
int getAllowedArgs() -
parse
- Throws:
ParseException
-
checkNumArgs
- Throws:
ParseException
-