An implementation class for flags (boolean) options.
An implementation class for flags (boolean) options.
Exception raised when an invalid value string is given.
Exception raised when an invalid value string is given. Not all errors
are detected and reported this way. For example, calls to s.toInt
for
an invalid string will result in NumberFormatException
.
Each option attempts to parse one or more tokens in the argument list.
Each option attempts to parse one or more tokens in the argument list. If successful, it returns the option's name and extracted value as a tuple, along with the rest of the arguments.
Create a Byte option.
Create a Char option.
Create a Char option. Just takes the first character in the value string.
Create a Double option.
Create a "flag" (Boolean) option.
Create a "flag" (Boolean) option. Unlike all the other kinds of options, it does not consume an argument that follows it. Instead the inferred default value corresponding to the flag is false. If a user specifies the flag on the command line, the corresponding value is true.
Opt.notflag
Create a Float option.
Create an Int option.
Create a Long option.
Like flag
, but the default value is true, not false.
Like flag
, but the default value is true, not false.
Opt.flag
A helper method for path-like structures, where the default delimiter for the platform is used, e.g., ':' for *nix systems and ';' for Windows.
Create an option where the value string represents a sequence with a delimiter.
Create an option where the value string represents a sequence with a delimiter. The delimiter string is treated as a regex. For matching on several possible delimiter characters, use "[;-_]", for example. The resulting substrings won't be trimmed of whitespace, in case you want it, but you can also remove any internal whitespace (i.e., not at the beginning or end of the input string), e.g., "\\s*[;-_]\\s*". The delimiter is given as a separate argument list so that the list of common Opt arguments is consistent with the other helper methods.
A helper method when the substrings are returned without further processing required.
Create a String option
Lift String => V
to String => Seq[V]
.
Lift String => V
to String => Try[V]
.