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.10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classa class to handle one option -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHandler(OptParse.OptHandler<E> handler) add a handler for some optionvoida handler can call this to interrupt the parsingvoidprint help of all optionsvoidchange 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
-