Class ArgumentValues

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      boolean isDefined​(Argument arg)
      Returns whetheror not the command line argument was actually provided on the command line.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPostArgs

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

        public java.util.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 java.util.List<java.lang.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 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.
        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