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 Option
DefaultParser. currentOption
The 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. optionComparator
Comparator 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 Option
Option.Builder. build()
Constructs an Option with the values declared by thisOption.Builder
.static Option
OptionBuilder. create()
Deprecated.Creates an Option using the current settingsstatic Option
OptionBuilder. create(char opt)
Deprecated.Creates an Option using the current settings and with the specified Optionchar
.static Option
OptionBuilder. create(java.lang.String opt)
Deprecated.Creates an Option using the current settings and with the specified Optionchar
.Option
AlreadySelectedException. getOption()
Gets the option that was added to the group and triggered the exception.Option
MissingArgumentException. getOption()
Return the option requiring an argument that wasn't provided on the command line.Option
Options. getOption(java.lang.String opt)
Gets theOption
matching the long or short name specified.Option[]
CommandLine. getOptions()
Gets an array of the processedOption
s.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()
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 void
CommandLine. addOption(Option opt)
Add an option to the command line.CommandLine.Builder
CommandLine.Builder. addOption(Option opt)
Add an option to the command line.OptionGroup
OptionGroup. addOption(Option option)
Add the specifiedOption
to this group.Options
Options. addOption(Option opt)
Adds an option instanceOptionGroup
Options. getOptionGroup(Option opt)
Gets the OptionGroup theopt
belongs to.java.util.Properties
CommandLine. getOptionProperties(Option option)
Retrieve the map of values associated to the option.java.lang.String
CommandLine. getOptionValue(Option option)
Retrieve the first argument, if any, of this option.java.lang.String
CommandLine. getOptionValue(Option option, java.lang.String defaultValue)
Retrieve the first argument, if any, of an option.java.lang.String[]
CommandLine. getOptionValues(Option option)
Retrieves the array of values, if any, of an option.java.lang.Object
CommandLine. getParsedOptionValue(Option option)
Return a version of thisOption
converted to a particular type.boolean
CommandLine. hasOption(Option opt)
Tests to see if an option has been set.void
Parser. processArgs(Option opt, java.util.ListIterator<java.lang.String> iter)
Deprecated.Process the argument values for the specified Optionopt
using the values retrieved from the specified iteratoriter
.void
OptionGroup. setSelected(Option option)
Set 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 void
HelpFormatter. setOptionComparator(java.util.Comparator<Option> comparator)
Set the comparator used to sort the options when they output in help text.Constructors in org.apache.commons.cli with parameters of type Option Constructor Description AlreadySelectedException(OptionGroup group, Option option)
Constructs a newAlreadySelectedException
for the specified option group.MissingArgumentException(Option option)
Construct a newMissingArgumentException
with the specified detail message.
-