Class CommandLineParser.CommandLineOption

  • Enclosing class:
    CommandLineParser

    protected static class CommandLineParser.CommandLineOption
    extends 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 Detail

      • CommandLineOption

        public CommandLineOption​(String option,
                                 boolean expectsArgs,
                                 String comment,
                                 String argument,
                                 boolean mandatory,
                                 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.