Uses of Class
org.apache.commons.cli.Option
-
-
Uses of Option in org.apache.commons.cli
Fields in org.apache.commons.cli declared as Option Modifier and Type Field Description protected OptionDefaultParser. currentOptionThe last option parsed.Fields in org.apache.commons.cli with type parameters of type Option Modifier and Type Field Description protected java.util.Comparator<Option>HelpFormatter. optionComparatorComparator used to sort the options when they output in help text Defaults to case-insensitive alphabetical sorting by option keyMethods in org.apache.commons.cli that return Option Modifier and Type Method Description OptionOption.Builder. build()Constructs an Option with the values declared by thisOption.Builder.static OptionOptionBuilder. create()Deprecated.Creates an Option using the current settingsstatic OptionOptionBuilder. create(char opt)Deprecated.Creates an Option using the current settings and with the specified Optionchar.static OptionOptionBuilder. create(java.lang.String opt)Deprecated.Creates an Option using the current settings and with the specified Optionchar.OptionAlreadySelectedException. getOption()Gets the option that was added to the group and triggered the exception.OptionMissingArgumentException. getOption()Gets the option requiring an argument that wasn't provided on the command line.OptionOptions. getOption(java.lang.String opt)Gets theOptionmatching the long or short name specified.Option[]CommandLine. getOptions()Gets an array of the processedOptions.Methods in org.apache.commons.cli that return types with arguments of type Option Modifier and Type Method Description java.util.Comparator<Option>HelpFormatter. getOptionComparator()Comparator used to sort the options when they output in help text.java.util.Collection<Option>OptionGroup. getOptions()Gets the options in this group as aCollection.java.util.Collection<Option>Options. getOptions()Gets a read-only list of options in this setjava.util.Iterator<Option>CommandLine. iterator()Returns an iterator over the Option members of CommandLine.Methods in org.apache.commons.cli with parameters of type Option Modifier and Type Method Description protected voidCommandLine. addOption(Option opt)Adds an option to the command line.CommandLine.BuilderCommandLine.Builder. addOption(Option opt)Adds an option to the command line.OptionGroupOptionGroup. addOption(Option option)Adds the givenOptionto this group.OptionsOptions. addOption(Option opt)Adds an option instancestatic java.lang.StringHelpFormatter. getDescription(Option option)Gets the option description or an empty string if the description isnull.OptionGroupOptions. getOptionGroup(Option opt)Gets the OptionGroup theoptbelongs to.java.util.PropertiesCommandLine. getOptionProperties(Option option)Gets the map of values associated to the option.java.lang.StringCommandLine. getOptionValue(Option option)Gets the first argument, if any, of this option.java.lang.StringCommandLine. getOptionValue(Option option, java.lang.String defaultValue)Gets the first argument, if any, of an option.java.lang.StringCommandLine. getOptionValue(Option option, java.util.function.Supplier<java.lang.String> defaultValue)Gets the first argument, if any, of an option.java.lang.String[]CommandLine. getOptionValues(Option option)Gets the array of values, if any, of an option.<T> TCommandLine. getParsedOptionValue(Option option)Gets a version of thisOptionconverted to a particular type.<T> TCommandLine. getParsedOptionValue(Option option, java.util.function.Supplier<T> defaultValue)Gets a version of thisOptionconverted to a particular type.<T> TCommandLine. getParsedOptionValue(Option option, T defaultValue)Gets a version of thisOptionconverted to a particular type.booleanCommandLine. hasOption(Option opt)Tests to see if an option has been set.voidParser. processArgs(Option opt, java.util.ListIterator<java.lang.String> iter)Deprecated.Process the argument values for the specified Optionoptusing the values retrieved from the specified iteratoriter.voidOptionGroup. setSelected(Option option)Sets the selected option of this group toname.Method parameters in org.apache.commons.cli with type arguments of type Option Modifier and Type Method Description CommandLine.BuilderCommandLine.Builder. setDeprecatedHandler(java.util.function.Consumer<Option> deprecatedHandler)Sets the deprecated option handler.DefaultParser.BuilderDefaultParser.Builder. setDeprecatedHandler(java.util.function.Consumer<Option> deprecatedHandler)Sets the deprecated option handler.voidHelpFormatter. setOptionComparator(java.util.Comparator<Option> comparator)Sets the comparator used to sort the options when they output in help text.HelpFormatter.BuilderHelpFormatter.Builder. setShowDeprecated(java.util.function.Function<Option,java.lang.String> deprecatedFormatFunction)Sets whether to show deprecated options.Constructors in org.apache.commons.cli with parameters of type Option Constructor Description AlreadySelectedException(OptionGroup group, Option option)Constructs a newAlreadySelectedExceptionfor the specified option group.MissingArgumentException(Option option)Constructs a newMissingArgumentExceptionwith the specified detail message.
-