| java.lang.Object joptsimple.OptionSet
OptionSet | public class OptionSet (Code) | | Representation of a group of detected command line options, their arguments, and
non-option arguments.
since: 1.0 author: Paul Holser version: $Id: OptionSet.java,v 1.22 2007/04/10 20:06:25 pholser Exp $ |
addNonOptionArgument | void addNonOptionArgument(String argument)(Code) | | |
argumentOf | public String argumentOf(String option)(Code) | | Gives the argument associated with the given option.
since: 1.0 Parameters: option - the option to search for the argument of the given option as a String; null ifno argument is present, or that option was not detected throws: OptionException - if more than one argument was detected for the option throws: ClassCastException - if the argument was given a type other thanString See Also: OptionSet.valueOf(String) |
argumentsOf | public List argumentsOf(String option)(Code) | | Gives any arguments associated with the given option.
since: 1.0 Parameters: option - the option to search for the arguments associated with the option, as a list of objects of thetype given to the arguments; an empty list if no such arguments are present, or ifthe option was not detected See Also: OptionSet.valuesOf(String) |
hasArgument | public boolean hasArgument(String option)(Code) | | Tells whether there are any arguments associated with the given option.
since: 1.0 Parameters: option - the option to search for true if the option was detected and at least one argument wasdetected for the option |
hashCode | public int hashCode()(Code) | | |
nonOptionArguments | public List nonOptionArguments()(Code) | | Gives the detected non-option arguments.
since: 2.1 the detected non-option arguments as a list of Strings. |
valueOf | public Object valueOf(String option)(Code) | | Gives the argument associated with the given option. If the argument was given a
type, it will take on that type; otherwise, use
OptionSet.argumentOf(String)argumentOf to get the argument as a
String .
since: 2.0 Parameters: option - the option to search for the argument of the given option; null if no argument ispresent, or that option was not detected throws: OptionException - if more than one argument was detected for theoption |
valuesOf | public List valuesOf(String option)(Code) | | Gives any arguments associated with the given option.
since: 2.0 Parameters: option - the option to search for the arguments associated with the option, as a list of objects of thetype given to the arguments; an empty list if no such arguments are present, or ifthe option was not detected |
wasDetected | public boolean wasDetected(String option)(Code) | | Tells whether the given option was detected.
since: 1.0 Parameters: option - the option to search for true if the option was detected |
|
|