Class OptionHelper



  • public class OptionHelper
    extends Object
    • Constructor Detail

      • OptionHelper

        public OptionHelper()
    • Method Detail

      • addS

        public static Option addS(Options options,
                                  String opt,
                                  boolean hasArg,
                                  boolean required,
                                  String description)
        Add a short option to the options specified by parameters
        Parameters:
        options - the options to add to.
        opt - the short option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        description - the option description
        Returns:
        the Option object created.
      • addS

        public static Option addS(Options options,
                                  String opt,
                                  boolean hasArg,
                                  boolean required,
                                  String argName,
                                  String description)
        Add a short option to the options specified by parameters
        Parameters:
        options - the options to add to.
        opt - the short option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        argName - the name of the argument.
        description - the option description
        Returns:
        the Option object created.
      • addL

        public static Option addL(Options options,
                                  String longName,
                                  boolean hasArg,
                                  boolean required,
                                  String description)
        Add a long option to the options specified by parameters
        Parameters:
        options - the options to add to.
        longName - the long option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        description - the option description
        Returns:
        the Option object created.
      • addL

        public static Option addL(Options options,
                                  String longName,
                                  boolean hasArg,
                                  boolean required,
                                  String argName,
                                  String description)
        Add a long option to the options specified by parameters
        Parameters:
        options - the options to add to.
        longName - the long option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        argName - the name of the argument.
        description - the option description
        Returns:
        the Option object created.
      • add

        public static Option add(Options options,
                                 String opt,
                                 String longName,
                                 boolean hasArg,
                                 boolean required,
                                 String description)
        Add an option to the options specified by parameters
        Parameters:
        options - the options to add to.
        opt - the short option name.
        longName - the long option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        description - the option description
        Returns:
        the Option object created.
      • add

        public static Option add(Options options,
                                 String opt,
                                 String longName,
                                 boolean hasArg,
                                 boolean required,
                                 String argName,
                                 String description)
        Add an option to the options specified by parameters
        Parameters:
        options - the options to add to.
        opt - the short option name.
        longName - the long option name.
        hasArg - whether it expects an argument
        required - whether this is a required option.
        argName - the name of the argument.
        description - the option description
        Returns:
        the Option object created.