trait DefaultConverters extends AnyRef
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._.
- Source
- DefaultConverters.scala
- Alphabetic
- By Inheritance
- DefaultConverters
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit val bigDecimalConverter: ValueConverter[BigDecimal]
- implicit val bigIntConverter: ValueConverter[BigInt]
- implicit val byteConverter: ValueConverter[Byte]
- implicit val byteListConverter: ValueConverter[List[Byte]]
- implicit val bytePropsConverter: ValueConverter[Map[String, Byte]]
- implicit val charConverter: ValueConverter[Char]
- implicit val charPropsConverter: ValueConverter[Map[String, Char]]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit val doubleConverter: ValueConverter[Double]
- implicit val doubleListConverter: ValueConverter[List[Double]]
- implicit val doublePropsConverter: ValueConverter[Map[String, Double]]
- implicit val durationConverter: ValueConverter[Duration]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- implicit val finiteDurationConverter: ValueConverter[FiniteDuration]
- implicit val flagConverter: ValueConverter[Boolean]
- implicit val floatConverter: ValueConverter[Float]
- implicit val floatListConverter: ValueConverter[List[Float]]
- implicit val floatPropsConverter: ValueConverter[Map[String, Float]]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- implicit val intConverter: ValueConverter[Int]
- implicit val intListConverter: ValueConverter[List[Int]]
- implicit val intPropsConverter: ValueConverter[Map[String, Int]]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listArgConverter[A](conv: (String) => A): ValueConverter[List[A]]
Creates a converter for an option which accepts multiple arguments.
Creates a converter for an option which accepts multiple arguments.
- conv
The conversion function to use on each argument. May throw an exception on error.
- returns
A ValueConverter instance.
- implicit val longConverter: ValueConverter[Long]
- implicit val longListConverter: ValueConverter[List[Long]]
- implicit val longPropsConverter: ValueConverter[Map[String, Long]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numberHandler[T](name: String): PartialFunction[Throwable, Either[String, Option[T]]]
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.
- name
the type name to display
- def optDefault[A](default: A)(implicit conv: ValueConverter[A]): ValueConverter[A]
Creates a converter for an option with single optional argument (it will parse both
--optand--opt argcommand lines).Creates a converter for an option with single optional argument (it will parse both
--optand--opt argcommand lines).- default
The default value to use if argument wasn't provided.
- conv
Converter instance to use if argument was provided.
- returns
A ValueConverter instance.
- def propsConverter[A](conv: ValueConverter[A]): ValueConverter[Map[String, A]]
Creates a converter for a property option.
Creates a converter for a property option.
- conv
The converter function to use on each value. May throw an exception on error.
- returns
A ValueConverter instance.
- implicit val shortConverter: ValueConverter[Short]
- implicit val shortListConverter: ValueConverter[List[Short]]
- implicit val shortPropsConverter: ValueConverter[Map[String, Short]]
- def singleArgConverter[A](conv: (String) => A, handler: PartialFunction[Throwable, Either[String, Option[A]]] = PartialFunction.empty): ValueConverter[A]
Creates a converter for an option with a single argument.
Creates a converter for an option with a single argument.
- 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.
- implicit val stringConverter: ValueConverter[String]
- implicit val stringListConverter: ValueConverter[List[String]]
- implicit val stringPropsConverter: ValueConverter[Map[String, String]]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tallyConverter: ValueConverter[Int] { val argType: org.rogach.scallop.ArgType.FLAG.type }
Converter for a tally option, used in ScallopConf.tally
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()