abstract class FromString[+T] extends PartialFunction[String, T]
A general mechanism for defining how a command line argument (always a String) is transformed into an arbitrary type. A few example instances are in the companion object, but in general either IntFromString will suffice or you'll want custom transformers.
- Source
- FromString.scala
Linear Supertypes
Type Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- FromString
- PartialFunction
- Function1
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new FromString()(implicit m: OptManifest[T])
Abstract Value Members
-
abstract
def
apply(s: String): T
- Definition Classes
- FromString → Function1
Concrete Value Members
-
def
andThen[C](k: (T) ⇒ C): PartialFunction[String, C]
- Definition Classes
- PartialFunction → Function1
-
def
applyOrElse[A1 <: String, B1 >: T](x: A1, default: (A1) ⇒ B1): B1
- Definition Classes
- PartialFunction
-
def
compose[A](g: (A) ⇒ String): (A) ⇒ T
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
isDefinedAt(s: String): Boolean
- Definition Classes
- FromString → PartialFunction
-
def
lift: (String) ⇒ Option[T]
- Definition Classes
- PartialFunction
-
def
orElse[A1 <: String, B1 >: T](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
- Definition Classes
- PartialFunction
-
def
runWith[U](action: (T) ⇒ U): (String) ⇒ Boolean
- Definition Classes
- PartialFunction
- def targetString: String
-
def
toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- def zero: T
The Scala compiler and reflection APIs.