Package org.jacop.jasat.utils
Class OptParse<E>
java.lang.Object
org.jacop.jasat.utils.OptParse<E>
util to parse command-line arguments
- Version:
- 4.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
a class to handle one option -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHandler
(OptParse.OptHandler<E> handler) add a handler for some optionvoid
a handler can call this to interrupt the parsingvoid
print help of all optionsvoid
change the main help string, which will be printed if asked, or if a wrong option is given
-
Field Details
-
realArgs
-
handlers
-
mainHelp
-
-
Constructor Details
-
OptParse
public OptParse()
-
-
Method Details
-
addHandler
add a handler for some option- Parameters:
handler
- the handler
-
setHelp
change the main help string, which will be printed if asked, or if a wrong option is given- Parameters:
helpString
- the help string
-
parse
-
printHelp
public void printHelp()print help of all options -
exitParsing
public void exitParsing()a handler can call this to interrupt the parsing
-