Class CommandLineParser.CommandLineOption

  • Enclosing class:
    CommandLineParser

    protected static class CommandLineParser.CommandLineOption
    extends java.lang.Object
    Holds information about a command line options. This includes what its name is, whether or not it is a flag, whether or not it is mandatory, what its user comment is, what its argument reminder text is and what its regular expression format is.
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandLineOption​(java.lang.String option, boolean expectsArgs, java.lang.String comment, java.lang.String argument, boolean mandatory, java.lang.String formatRegexp)
      Create a command line option object that holds specific information about a command line option.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandLineOption

        public CommandLineOption​(java.lang.String option,
                                 boolean expectsArgs,
                                 java.lang.String comment,
                                 java.lang.String argument,
                                 boolean mandatory,
                                 java.lang.String formatRegexp)
        Create a command line option object that holds specific information about a command line option.
        Parameters:
        option - The text that matches the option.
        expectsArgs - Whether or not the option expects arguments. It is a flag if this is false.
        comment - A comment explaining how to use this option.
        argument - A short reminder of the format of the argument to this option/
        mandatory - Set to true if this option is mandatory.
        formatRegexp - The regular expression that the argument to this option must meet to be valid.