A General Converter is a wrapper for a function (String)=>T
This function is used by the CsvParser to parse fields of type T
There are several default converters defined or you can make your own
and make them available as implict parameters.
The reason we use a wrapper is to avoid any old (String)=>T function
being selected by mistake. If you made a GeneralConverter then you
almost certainly intended that the parser use it to convert type T.
Example:
implicitobject ymd extends GeneralConverter[java.util.Date]{
val f= new java.text.SimpleDateFormat("yy-MM-dd")
def convert(x:String)=f.parse(x.trim)
}
Annotations
@implicitNotFound(...)
Linear Supertypes
AnyRef, Any
Ordering
Alphabetic
By Inheritance
Inherited
GeneralConverter
AnyRef
Any
Implicitly
by any2stringadd
by StringFormat
by Ensuring
by ArrowAssoc
Hide All
Show All
Visibility
Public
All
Instance Constructors
newGeneralConverter(converter: (String) ⇒ A)
Value Members
final def!=(arg0: Any): Boolean
Definition Classes
AnyRef → Any
final def##(): Int
Definition Classes
AnyRef → Any
def+(other: String): String
Implicit information
This member is added by an implicit conversion from GeneralConverter[A] to
any2stringadd[GeneralConverter[A]] performed by method any2stringadd in scala.Predef.
This member is added by an implicit conversion from GeneralConverter[A] to
ArrowAssoc[GeneralConverter[A]] performed by method ArrowAssoc in scala.Predef.
This member is added by an implicit conversion from GeneralConverter[A] to
StringFormat[GeneralConverter[A]] performed by method StringFormat in scala.Predef.
This member is added by an implicit conversion from GeneralConverter[A] to
ArrowAssoc[GeneralConverter[A]] performed by method ArrowAssoc in scala.Predef.
A General Converter is a wrapper for a function (String)=>T
This function is used by the CsvParser to parse fields of type T
There are several default converters defined or you can make your own and make them available as implict parameters.
The reason we use a wrapper is to avoid any old (String)=>T function being selected by mistake. If you made a GeneralConverter then you almost certainly intended that the parser use it to convert type T.
Example: