DefaultConverters
This trait contains various predefined converters for common use-cases.
org.rogach.scallop package object inherits from this trait, thus you can
get all the converters simply by importing org.rogach.scallop._
.
This trait contains various predefined converters for common use-cases.
org.rogach.scallop package object inherits from this trait, thus you can
get all the converters simply by importing org.rogach.scallop._
.
Value members
Concrete methods
Creates a converter for an option which accepts multiple arguments.
Creates a converter for an option which accepts multiple arguments.
- Value Params
- conv
The conversion function to use on each argument. May throw an exception on error.
- Returns
A ValueConverter instance.
Handler function for numeric types which expects a NumberFormatException and prints a more helpful error message.
Handler function for numeric types which expects a NumberFormatException and prints a more helpful error message.
- Value Params
- name
the type name to display
Creates a converter for an option with single optional argument
(it will parse both --opt
and --opt arg
command lines).
Creates a converter for an option with single optional argument
(it will parse both --opt
and --opt arg
command lines).
- Value Params
- conv
Converter instance to use if argument was provided.
- default
The default value to use if argument wasn't provided.
- Returns
A ValueConverter instance.
Creates a converter for a property option.
Creates a converter for a property option.
- Value Params
- conv
The converter function to use on each value. May throw an exception on error.
- Returns
A ValueConverter instance.
Creates a converter for an option with a single argument.
Creates a converter for an option with a single argument.
- Value Params
- conv
The conversion function to use. May throw an exception on error.
- handler
An error handler function for writing custom error messages.
- Returns
A ValueConverter instance.