Class ArgumentValues
java.lang.Object
org.apache.geode.modules.session.installer.args.ArgumentValues
Result object capturing the result of processing command line arguments.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllResults(Argument arg) Returns all results for the specified argument.Returns a list of all defined arguments.intgetDefinedCount(Argument... ofThese) Counts the number of arguments defined on the command line which are in the list provided.getFirstResult(Argument arg) Convenience method to return the first value of the first instance of the command line argument values for the specified argument.intgetFirstResultAsInt(Argument arg, int undefinedValue) Convenience method to return the result of getFirstResult method as an integer.String[]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.booleanReturns whetheror not the command line argument was actually provided on the command line.
-
Method Details
-
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.- Returns:
- all unprocess arguments
-
getDefinedArguments
Returns a list of all defined arguments.- Returns:
- set of arguments
-
getDefinedCount
Counts the number of arguments defined on the command line which are in the list provided.- Parameters:
ofThese- the arguments to search for, or null to count all supplied arguments- Returns:
- count of the defined arguments
-
isDefined
Returns whetheror not the command line argument was actually provided on the command line.- Parameters:
arg- argument to query- Returns:
- true if the argument is defined by the command line, false otherwise
-
getAllResults
Returns all results for the specified argument. If a command line option is specified more than once, this is the method to use to get all values.- Parameters:
arg- argument to query- Returns:
- list of all parameter lists defined for this argument
-
getFirstResult
Convenience method to return the first value of the first instance of the command line argument values for the specified argument.- Parameters:
arg- argument to query- Returns:
- first parameter of the first list of parameters supplied
-
getFirstResultAsInt
Convenience method to return the result of getFirstResult method as an integer.- Parameters:
arg- argument to queryundefinedValue- value to return when argument is not defined or is illegally defined- Returns:
- value specified, or default value provided
-