Object/Class

com.concurrentthought.cla

Opt

Related Docs: class Opt | package cla

Permalink

object Opt extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Opt
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Flag extends Opt[Boolean]

    Permalink

    An implementation class for flags (boolean) options.

    An implementation class for flags (boolean) options.

    Attributes
    protected[com.concurrentthought.cla]
  2. case class InvalidValueString(flag: String, valueMessage: String, cause: Option[Throwable] = None) extends RuntimeException with Product with Serializable

    Permalink

    Exception raised when an invalid value string is given.

    Exception raised when an invalid value string is given. Not all errors are detected and reported this way. For example, calls to s.toInt for an invalid string will result in NumberFormatException.

  3. type Parser[V] = PartialFunction[Seq[String], ((String, Try[V]), Seq[String])]

    Permalink

    Each option attempts to parse one or more tokens in the argument list.

    Each option attempts to parse one or more tokens in the argument list. If successful, it returns the option's name and extracted value as a tuple, along with the rest of the arguments.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def byte(name: String, flags: Seq[String], default: Option[Byte] = None, help: String = "", requiredFlag: Boolean = false): Opt[Byte]

    Permalink

    Create a Byte option.

  6. def char(name: String, flags: Seq[String], default: Option[Char] = None, help: String = "", requiredFlag: Boolean = false): Opt[Char]

    Permalink

    Create a Char option.

    Create a Char option. Just takes the first character in the value string.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def double(name: String, flags: Seq[String], default: Option[Double] = None, help: String = "", requiredFlag: Boolean = false): Opt[Double]

    Permalink

    Create a Double option.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def flag(name: String, flags: Seq[String], help: String = "", requiredFlag: Boolean = false): Flag

    Permalink

    Create a "flag" (Boolean) option.

    Create a "flag" (Boolean) option. Unlike all the other kinds of options, it does not consume an argument that follows it. Instead the inferred default value corresponding to the flag is false. If a user specifies the flag on the command line, the corresponding value is true.

    See also

    Opt.notflag

  13. def float(name: String, flags: Seq[String], default: Option[Float] = None, help: String = "", requiredFlag: Boolean = false): Opt[Float]

    Permalink

    Create a Float option.

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def int(name: String, flags: Seq[String], default: Option[Int] = None, help: String = "", requiredFlag: Boolean = false): Opt[Int]

    Permalink

    Create an Int option.

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def long(name: String, flags: Seq[String], default: Option[Long] = None, help: String = "", requiredFlag: Boolean = false): Opt[Long]

    Permalink

    Create a Long option.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def notflag(name: String, flags: Seq[String], help: String = "", requiredFlag: Boolean = false): Flag

    Permalink

    Like flag, but the default value is true, not false.

    Like flag, but the default value is true, not false.

    See also

    Opt.flag

  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def path(name: String, flags: Seq[String], default: Option[Seq[String]] = None, help: String = "List of file system paths", requiredFlag: Boolean = false): Opt[Seq[String]]

    Permalink

    A helper method for path-like structures, where the default delimiter for the platform is used, e.g., ':' for *nix systems and ';' for Windows.

  24. def pathSeparator: String

    Permalink
  25. def seq[V](delimsRE: String)(name: String, flags: Seq[String], default: Option[Seq[V]] = None, help: String = "", requiredFlag: Boolean = false)(fromString: (String) ⇒ Try[V]): Opt[Seq[V]]

    Permalink

    Create an option where the value string represents a sequence with a delimiter.

    Create an option where the value string represents a sequence with a delimiter. The delimiter string is treated as a regex. For matching on several possible delimiter characters, use "[;-_]", for example. The resulting substrings won't be trimmed of whitespace, in case you want it, but you can also remove any internal whitespace (i.e., not at the beginning or end of the input string), e.g., "\\s*[;-_]\\s*". The delimiter is given as a separate argument list so that the list of common Opt arguments is consistent with the other helper methods.

  26. def seqString(delimsRE: String)(name: String, flags: Seq[String], default: Option[Seq[String]] = None, help: String = "", requiredFlag: Boolean = false): Opt[Seq[String]]

    Permalink

    A helper method when the substrings are returned without further processing required.

  27. def string(name: String, flags: Seq[String], default: Option[String] = None, help: String = "", requiredFlag: Boolean = false): Opt[String]

    Permalink

    Create a String option

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toSeq[V](to: (String) ⇒ V): (String) ⇒ Seq[V]

    Permalink

    Lift String => V to String => Seq[V].

  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. def toTry[V](to: (String) ⇒ V): (String) ⇒ Try[V]

    Permalink

    Lift String => V to String => Try[V].

  32. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped