|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjoptsimple.OptionSet
public class OptionSet
Representation of a group of detected command line options, their arguments, and non-option arguments.
| Method Summary | |
|---|---|
String |
argumentOf(String option)
Gives the argument associated with the given option. |
List |
argumentsOf(String option)
Gives any arguments associated with the given option. |
boolean |
equals(Object that)
|
boolean |
has(String option)
Tells whether the given option was detected. |
boolean |
hasArgument(String option)
Tells whether there are any arguments associated with the given option. |
int |
hashCode()
|
List |
nonOptionArguments()
Gives the detected non-option arguments. |
Object |
valueOf(String option)
Gives the argument associated with the given option. |
List |
valuesOf(String option)
Gives any arguments associated with the given option. |
boolean |
wasDetected(String option)
Deprecated. Use has instead. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean wasDetected(String option)
has instead.
Tells whether the given option was detected.
option - the option to search for
true if the option was detectedpublic boolean has(String option)
Tells whether the given option was detected.
option - the option to search for
true if the option was detectedpublic boolean hasArgument(String option)
Tells whether there are any arguments associated with the given option.
option - the option to search for
true if the option was detected and at least one argument was
detected for the optionpublic String argumentOf(String option)
Gives the argument associated with the given option.
option - the option to search for
String; null if
no argument is present, or that option was not detected
OptionException - if more than one argument was detected for the option
ClassCastException - if the argument was given a type other than
StringvalueOf(String)public List argumentsOf(String option)
Gives any arguments associated with the given option.
option - the option to search for
valuesOf(String)public Object valueOf(String option)
Gives the argument associated with the given option. If the argument was
given a type, it will take on that type; otherwise, use argumentOf to get the argument as a String.
option - the option to search for
null if no argument is
present, or that option was not detected
OptionException - if more than one argument was detected for the optionpublic List valuesOf(String option)
Gives any arguments associated with the given option.
option - the option to search for
public List nonOptionArguments()
Gives the detected non-option arguments.
Strings.public boolean equals(Object that)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||