addStringOption

Adds an option that will have one string value supplied as a separate argument. Calling this method behaves exactly like calling addStringOption(option, null).

addStringOption("foo") will not produce any arguments.

addStringOption("foo").setValue("bar baz") will produce the command-line

    -foo 'bar baz'

Return

an option object to further configure the value

Parameters

option

command-line option


Adds an option that will have one string value supplied as a separate argument.

addStringOption("foo", "bar baz") will produce the command-line

    -foo 'bar baz'

A value of null will make the option not be supplied and can be used to unset an option that previously was set.

The returned option object can also be used to further configure the value.

addStringOption("foo", "bar baz").setValue("bam") will produce the command-line

    -foo bam

Return

an option object to further configure the value

Parameters

option

command-line option

value

the value to supply or null to suppress the option