Class OptParse<E>

java.lang.Object
org.jacop.jasat.utils.OptParse<E>

public class OptParse<E> extends Object
util to parse command-line arguments
Version:
4.8
  • Field Details

  • Constructor Details

    • OptParse

      public OptParse()
  • Method Details

    • addHandler

      public void addHandler(OptParse.OptHandler<E> handler)
      add a handler for some option
      Parameters:
      handler - the handler
    • setHelp

      public void setHelp(String helpString)
      change the main help string, which will be printed if asked, or if a wrong option is given
      Parameters:
      helpString - the help string
    • parse

      public E parse(String[] args, E e)
    • printHelp

      public void printHelp()
      print help of all options
    • exitParsing

      public void exitParsing()
      a handler can call this to interrupt the parsing