org.clapper.argot

ArgotConverters

object ArgotConverters extends AnyRef

Conversion functions that can be used to satisfy the implicit conversions specified to the various specification functions in the ArgotParser class. If you import this namespace, you'll get a bunch of implicit conversion functions that the Scala compiler will automatically use, for the various definition functions in ArgotParser.

The conversion functions all take the CommandLineArgument for which the value applies. This serves two purposes. First, it provides more information for error messages. Second, it makes the conversion functions less ambiguous.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ArgotConverters
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. implicit def convertByte (s: String, opt: CommandLineArgument[Byte]): Byte

    Convert a string value into a byte value.

    Convert a string value into a byte value. A non-numeric string value will cause an error, as will a value that is outside the range [0, 255].

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the integer

    Attributes
    implicit
  9. implicit def convertChar (s: String, opt: CommandLineArgument[Char]): Char

    Convert a string value into a character.

    Convert a string value into a character. A string that is empty or is longer than one character in length will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the character

    Attributes
    implicit
  10. implicit def convertDouble (s: String, opt: CommandLineArgument[Double]): Double

    Convert a string value into an double.

    Convert a string value into an double. A non-numeric string value will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the double.

    Attributes
    implicit
  11. implicit def convertFlag [Boolean] (onOff: Boolean, opt: FlagOption[Boolean]): Boolean

    Convert a value for a flag option.

    Convert a value for a flag option. This function is primarily a no-op that exists to satisfy the implicit parameter for the ArgotParser.flag() methods.

    onOff

    the value to be returned

    opt

    the command line argument to which the value applies

    returns

    the value of onOff

    Attributes
    implicit
  12. implicit def convertFloat (s: String, opt: CommandLineArgument[Float]): Float

    Convert a string value into a float.

    Convert a string value into a float. A non-numeric string value will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the float.

    Attributes
    implicit
  13. implicit def convertInt (s: String, opt: CommandLineArgument[Int]): Int

    Convert a string value into an integer.

    Convert a string value into an integer. A non-numeric string value will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the integer

    Attributes
    implicit
  14. implicit def convertLong (s: String, opt: CommandLineArgument[Long]): Long

    Convert a string value into a long.

    Convert a string value into a long. A non-numeric string value will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the long integer

    Attributes
    implicit
  15. implicit def convertSeq [T] (s: String, opt: MultiValueOption[T])(implicit parse: (String, String) ⇒ T): Seq[T]

    Convert a string value into a sequence, adding the result to the supplied MultiValueOption object's value field.

    Convert a string value into a sequence, adding the result to the supplied MultiValueOption object's value field. The string is split into multiple strings via the supplied parse() function parameter; the parameter is marked implicit, so that it can be satisfied automatically.

    If the ArgotConverters name space is in scope, then the default implicit function that satisfies the parameter simply returns the string, unparsed, thus resulting in the argument string being concatenated, as is, to the MultiValueOption. This behavior is generally the one most often used; however, it's possible to substitute other parsing functions that (for instance) split the string based on a delimiter.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the integer

    Attributes
    implicit
  16. implicit def convertShort (s: String, opt: CommandLineArgument[Short]): Short

    Convert a string value into a short.

    Convert a string value into a short. A non-numeric string value will cause an error.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the short

    Attributes
    implicit
  17. implicit def convertString (s: String, opt: CommandLineArgument[String]): String

    Convert a string value into a string.

    Convert a string value into a string. This function is a no-op.

    s

    the string value to convert

    opt

    the command line argument to which the value applies

    returns

    the integer

    Attributes
    implicit
  18. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  19. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  20. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  22. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  23. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  24. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  27. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  28. def toString (): String

    Definition Classes
    AnyRef → Any
  29. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any