Case class to represent an "option" in a command line. Such an option has an (optional) name which is a String; and an (optional) value, which is of type X.
Type parameters
- X
-
the underlying type of the value.
Value parameters
- name
-
the optional name.
- value
-
the optional value.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Convert this Arg[X] to an Arg[Y]. In practice, this method invokes mapMap with the function deriveFromOpt invoked on the Derivable[Y] evidence.
Convert this Arg[X] to an Arg[Y]. In practice, this method invokes mapMap with the function deriveFromOpt invoked on the Derivable[Y] evidence.
Type parameters
- Y
-
the underlying type of the result, such that there is evidence of a Derivable[Y] provided implicitly.
Attributes
- Returns
-
an Arg[Y].
Method to get this Arg, if and only if its name matches the given String (w)
Method to get this Arg, if and only if its name matches the given String (w)
Value parameters
- w
-
the string to match.
Attributes
- Returns
-
either Some(this) or else None.
Method to compare this Arg with that.
Method to compare this Arg with that.
This is a total order: two named Args (options) compare by name (their values are intentionally not significant, since ordering exists only to match Args against a Synopsis); an unnamed Arg (operand) always sorts after a named one, matching the POSIX convention that options precede operands; two unnamed Args compare equal.
Value parameters
- that
-
the Arg to compare with.
Attributes
- Returns
-
the result of invoking x compare y where x and y are the names of this and that Args.
Convert this Arg[X] to an Arg of Either[Y]. In practice, this method invokes map with the function deriveFromOpt invoked on the Derivable[Y] evidence.
Convert this Arg[X] to an Arg of Either[Y]. In practice, this method invokes map with the function deriveFromOpt invoked on the Derivable[Y] evidence.
Type parameters
- Y
-
the underlying type of the result, such that there is evidence of a Derivable[Y] provided implicitly.
Attributes
- Returns
-
an Arg of Either[Y]..
Method to flatMap this Arg into an Arg of underlying type Y
Method to flatMap this Arg into an Arg of underlying type Y
Type parameters
- Y
-
the underlying type of the result.
Value parameters
- f
-
a function to convert an X into a Y.
Attributes
- Returns
-
an Arg[Y]
Method to determine if this Arg has a value, thus either an option with value, or an operand.
Method to determine if this Arg has a value, thus either an option with value, or an operand.
Attributes
- Returns
-
true if value is not None
Method to determine if this Arg is an option (also known as a "flag"), as opposed to an operand.
Method to determine if this Arg is an option (also known as a "flag"), as opposed to an operand.
Attributes
- Returns
-
true if name is not None
Method to determine if this Arg is optional according to the synopsis provided.
Method to determine if this Arg is optional according to the synopsis provided.
Value parameters
- s
-
the synopsis.
Attributes
- Returns
-
Kleenean(true if this Arg is optional.
Method to map this Arg into an Arg of underlying type Y
Method to map this Arg into an Arg of underlying type Y
Type parameters
- Y
-
the underlying type of the result.
Value parameters
- f
-
a function to convert an X into a Y.
Attributes
- Returns
-
an Arg[Y]
Method to map this Arg into an Arg of underlying type Y but where the function given is X => Option[Y]
Method to map this Arg into an Arg of underlying type Y but where the function given is X => Option[Y]
Type parameters
- Y
-
the underlying type of the result.
Value parameters
- f
-
a function to convert an X into an Option[Y].
Attributes
- Returns
-
an Arg[Y]
Method to process this Arg, given a map of options and their corresponding functions.
Method to process this Arg, given a map of options and their corresponding functions.
Value parameters
- fm
-
a Map of String->function where function is of type Option[X]=>Unit
Attributes
- Returns
-
a Success[None] if there was a function defined for this Arg in the map fm AND if the function invocation was successful; otherwise a Failure[X]
Method to form a String from this Arg
Method to form a String from this Arg
Attributes
- Returns
-
"Arg: flag name/anonymous with value: value/none"
- Definition Classes
-
Any
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Concrete fields
Method to return this Arg as an optional tuple of a String and an optional X value, according to whether it's an "option".
Method to return this Arg as an optional tuple of a String and an optional X value, according to whether it's an "option".
Attributes
- Returns
-
Some[(String, Option[X]) if name is not None otherwise None.
Method to return this Arg as an optional X value, according to whether it's an "operand".
Method to return this Arg as an optional X value, according to whether it's an "operand".
Attributes
- Returns
-
Some[X] if name is None otherwise None.