public class ArgumentValues
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addResult(Argument arg,
java.lang.String[] paramValues)
Sets the data values found for a specific argument.
|
java.util.List<java.lang.String[]> |
getAllResults(Argument arg)
Returns all results for the specified argument.
|
java.util.Set<Argument> |
getDefinedArguments()
Returns a list of all defined arguments.
|
int |
getDefinedCount(Argument... ofThese)
Counts the number of arguments defined on the command line which are in the
list provided.
|
java.lang.String |
getFirstResult(Argument arg)
Convenience method to return the first value of the first instance of the
command line argument values for the specified argument.
|
int |
getFirstResultAsInt(Argument arg,
int undefinedValue)
Convenience method to return the result of getFirstResult method as an
integer.
|
java.lang.String[] |
getPostArgs()
After processing the command line arguments, this method may be used to
return all arguments which were excluded from processing by their placement
after the "
-- " psuedo-argument. |
java.lang.String[] |
getResult(Argument arg)
Convenience method to retrieve the first instance of the command line
argument's values.
|
boolean |
isDefined(Argument arg)
Returns whetheror not the command line argument was actually provided on
the command line.
|
public java.lang.String[] getPostArgs()
--
" psuedo-argument.public void addResult(Argument arg, java.lang.String[] paramValues)
arg
- argumentparamValues
- parameter values for the argumentpublic java.util.Set<Argument> getDefinedArguments()
public int getDefinedCount(Argument... ofThese)
ofThese
- the arguments to search for, or null to count all supplied
argumentspublic boolean isDefined(Argument arg)
arg
- argument to querypublic java.util.List<java.lang.String[]> getAllResults(Argument arg)
arg
- argument to querypublic java.lang.String[] getResult(Argument arg)
arg
- argument to querypublic java.lang.String getFirstResult(Argument arg)
arg
- argument to querypublic int getFirstResultAsInt(Argument arg, int undefinedValue)
arg
- argument to queryundefinedValue
- value to return when argument is not defined or is
illegally defined