Class SimpleCommandLineParser.ValueOption<X>

    • Constructor Detail

      • ValueOption

        protected ValueOption​(java.lang.String aShortName,
                              java.lang.String aLongName,
                              java.lang.String aDescription,
                              java.lang.String aCommandLine)
        Creates a new value option.
        Parameters:
        aShortName - The short name of the option. Usually just one character.
        aLongName - The long name of the option, generelly a comprehendable, but not-too-long string.
        aDescription - The command line help string for this option.
        aCommandLine - The description for the help.
    • Method Detail

      • getValue

        public X getValue()
      • getValue

        public X getValue​(X aDefault)
        Returns the value found in the parameters from the user.
        Parameters:
        aDefault - the default to return if the param is not set
        Returns:
        the value from the user or the default
      • getValues

        public java.util.List<X> getValues()
        Returns all the values found in the parameters from the user.
        Returns:
        the values from the user (may be an empty list if none were given)
      • addValue

        protected abstract void addValue​(java.lang.String aValue)
        Sets the value.
        Parameters:
        aValue - the value
      • addValueInternal

        protected void addValueInternal​(X aValue)
        Adds the given value internally to the list of values.
        Parameters:
        aValue - the value to add