Convert a string value into a byte value.
Convert a string value into a byte value. A non-numeric string value will cause an error, as will a value that is outside the range [0, 255].
the string value to convert
the command line argument to which the value applies
the integer
Convert a string value into a character.
Convert a string value into a character. A string that is empty or is longer than one character in length will cause an error.
the string value to convert
the command line argument to which the value applies
the character
Convert a string value into an double.
Convert a string value into an double. A non-numeric string value will cause an error.
the string value to convert
the command line argument to which the value applies
the double.
Convert a value for a flag option.
Convert a value for a flag option. This function is primarily a
no-op that exists to satisfy the implicit parameter for the
ArgotParser.flag()
methods.
the value to be returned
the command line argument to which the value applies
the value of onOff
Convert a string value into a float.
Convert a string value into a float. A non-numeric string value will cause an error.
the string value to convert
the command line argument to which the value applies
the float.
Convert a string value into an integer.
Convert a string value into an integer. A non-numeric string value will cause an error.
the string value to convert
the command line argument to which the value applies
the integer
Convert a string value into a long.
Convert a string value into a long. A non-numeric string value will cause an error.
the string value to convert
the command line argument to which the value applies
the long integer
Convert a string value into a sequence, adding the result to the
supplied MultiValueOption
object's value
field.
Convert a string value into a sequence, adding the result to the
supplied MultiValueOption
object's value
field. The string is
split into multiple strings via the supplied parse()
function
parameter; the parameter is marked implicit, so that it can be
satisfied automatically.
If the ArgotConverters
name space is in scope, then the default
implicit function that satisfies the parameter simply returns the
string, unparsed, thus resulting in the argument string being
concatenated, as is, to the MultiValueOption
. This behavior is
generally the one most often used; however, it's possible to substitute
other parsing functions that (for instance) split the string based on
a delimiter.
the string value to convert
the command line argument to which the value applies
the integer
Convert a string value into a short.
Convert a string value into a short. A non-numeric string value will cause an error.
the string value to convert
the command line argument to which the value applies
the short
Convert a string value into a string.
Convert a string value into a string. This function is a no-op.
the string value to convert
the command line argument to which the value applies
the integer
Conversion functions that can be used to satisfy the implicit conversions specified to the various specification functions in the
ArgotParser
class. If you import this namespace, you'll get a bunch of implicit conversion functions that the Scala compiler will automatically use, for the various definition functions inArgotParser
.The conversion functions all take the
CommandLineArgument
for which the value applies. This serves two purposes. First, it provides more information for error messages. Second, it makes the conversion functions less ambiguous.