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
conversion error
The argument's description, displayed in the usage message.
The argument's description, displayed in the usage message.
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.
the key
Displayable name for the argument, used in the usage message.
Displayable name for the argument, used in the usage message.
the name
The ArgotParser
instance that owns this object.
The ArgotParser
instance that owns this object.
All options and values with parameters must have a placeholder name for the value, used in generating the usage message.
All options and values with parameters must have a placeholder name for the value, used in generating the usage message.
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
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
conversion error
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 the option's value.
Get the option's value.
Some(value)
if the value is set; None
if not.
SingleValueArg
is a refinement of theHasValue
trait, specifically for arguments (options or parameters) that take only a single value. This trait exists primarily as a place for shared logic and values for the option- and parameter-specific subclasses.the value type
SingleValueParameter
SingleValueOption