Class ArgumentValues

  • java.lang.Object
    • org.apache.geode.modules.session.installer.args.ArgumentValues

  • public class ArgumentValues
    extends Object
    Result object capturing the result of processing command line arguments.
    • Method Detail

      • getPostArgs

        public 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.
        Returns:
        all unprocess arguments
      • getDefinedArguments

        public Set<Argument> getDefinedArguments()
        Returns a list of all defined arguments.
        Returns:
        set of arguments
      • getDefinedCount

        public int getDefinedCount​(Argument... ofThese)
        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

        public boolean isDefined​(Argument arg)
        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

        public List<String[]> getAllResults​(Argument arg)
        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

        public 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.
        Parameters:
        arg - argument to query
        Returns:
        first parameter of the first list of parameters supplied
      • getFirstResultAsInt

        public int getFirstResultAsInt​(Argument arg,
                                       int undefinedValue)
        Convenience method to return the result of getFirstResult method as an integer.
        Parameters:
        arg - argument to query
        undefinedValue - value to return when argument is not defined or is illegally defined
        Returns:
        value specified, or default value provided