the parent parser instance that owns the option
the list of names the option is known by
the placeholder name for the option's value, for the usage message
textual description of the option
a function that will convert a string value for the
option to an appropriate value of type T
.
a function that will convert a string value for the
option to an appropriate value of type T
.
Method that converts a string value to type T
.
Method that converts a string value to type T
. Should throw
ArgotConversionException
on error.
the string to convert
the converted result
textual description of the option
textual description of the option
The standard equals()
method.
The standard equals()
method.
some other object
true
if the other object is the same class and is equivalent,
false
if not.
Always true
, indicating that HasValue
classes always have an
associated value.
Always true
, indicating that HasValue
classes always have an
associated value.
Calculate the hash code for the object.
Calculate the hash code for the object. The default implementation returns the hash code of the key.
the hash code
#key
Return an object that represents the key for this parameter, suitable for hashing, sorting, etc.
Return an object that represents the key for this parameter, suitable
for hashing, sorting, etc. They key for a command line option is the
result of calling name()
.
the key
Return a suitable name for the option.
Return a suitable name for the option. The returned name will have a "-" or "--" prefix, depending on whether it's long or short. It will be based on the first option in the list of option names.
the option name
the list of names the option is known by
the list of names the option is known by
the parent parser instance that owns the option
the parent parser instance that owns the option
Resets the internal state of the argument to what it was right after construction, undoing the effects of any parse operation.
Resets the internal state of the argument to what it was right after construction, undoing the effects of any parse operation.
Given a string value, convert the value to type T
by calling
convert()
, then store it by calling storeValue()
.
Given a string value, convert the value to type T
by calling
convert()
, then store it by calling storeValue()
.
the string to convert
Whether or not the class supports multiple values (e.
Whether or not the class supports multiple values (e.g., a sequence) or just one.
Get a printable name for this object.
Get a printable name for this object.
the printable name
Get the option's value.
Get the option's value.
Some(value)
if the value is set; None
if not.
the placeholder name for the option's value, for the usage message
the placeholder name for the option's value, for the usage message
Class for an option that takes a single value.