Convert this Args[X] to an Args[Y].
Convert this Args[X] to an Args[Y]. In practice, this method invokes map with the function deriveFrom invoked on the Derivable[Y] evidence.
the underlying type of the result, such that there is evidence of a Derivable[Y] provided implicitly.
an Args[Y].
Method to get an Arg whose name matches the given string.
Method to get an Arg whose name matches the given string.
the string to match
Some(arg) if the name matches, else None
Get the arg value where the name matches the given string and where the resulting type is Y
Get the arg value where the name matches the given string and where the resulting type is Y
the result type
the string to match
an option value of Y (None if toY yields a Failure)
Method to determine if the argument identified by w is defined.
Method to determine if the argument identified by w is defined.
the name of an argument (flag).
true if the argument is found by getArg
Apply the given function f to each Arg of this Args
Apply the given function f to each Arg of this Args
the result type of the function f
a function of type X => Y
an Args[Y] object
Method to process one Arg and return the remainder of the arguments as an Args.
Method to process one Arg and return the remainder of the arguments as an Args.
a partially-defined function which can process the arg.
if f is defined for the Arg, then return the remainder; otherwise return this as is.
EmptyArgsException
if this Args is empty.
MatchError
if the head Arg does not match function f.
Method to process one Arg and return the remainder of the arguments as an Args.
Method to process one Arg and return the remainder of the arguments as an Args. In this form of the method, a failure to match by function f will result in the default value being returned.
a partially-defined function which can process the arg.
a call-by-name value which will be returned in the event that function f is not defined for the actual Arg at the head of the list.
if f is defined for the Arg, then return the remainder; otherwise return the result of invoking default.
EmptyArgsException
if this Args is empty.
Get the operands (positional arguments) as a map of String->X pairs.
Get the operands (positional arguments) as a map of String->X pairs. This is achieved by matching up the names of operands from the synopsis (given) with the operands.
the synopsis from which we will derive the operand names.
a map of String->X pairs.
Get the operands or positional arguments (i.e.
Get the operands or positional arguments (i.e. args without names) as a sequence of X values.
a sequence of X values.
Get the options (i.e.
Get the options (i.e. args with names) as map of names to (optional) values
the options as a map
Process this Args according to the map fm of String->function.
Process this Args according to the map fm of String->function.
a Map of String->function where function is of type Option[X]=>Unit
a Try[Seq[X] resulting from iteration through each Arg and processing it.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Method to validate this Args according to the given Synopsis.
Method to validate this Args according to the given Synopsis.
CONSIDER returning Try[Boolean]
the Synopsis.
true if all the Arg elements of this are compatible with the synopsis.
InvalidOptionException
if this Arg cannot be found in the synopsis.
Method to validate this Args according to the (optional) synopsis given as sy.
Method to validate this Args according to the (optional) synopsis given as sy.
CONSIDER using lift CONSIDER using map/recover on sy
the optional Synopsis.
this, wrapped in Success, provided that the sy is not a Failure and that the result of calling validate(Synopsis) is true.
InvalidOptionException
if any Arg cannot be found in the synopsis.
Method to validate this Args according to the POSIX-style synopsis w, expressed as a String.
Method to validate this Args according to the POSIX-style synopsis w, expressed as a String.
the synopsis
this Args, assuming that all is OK