A Strongly typed Csv to Case Class, CollSeq[T1,T2,...Tn] Iterator[TupleN] or Iterator[Case Class] Parser.
Use the companion object to instantiate the correct parser:
scala> val p = CsvParser[String,Int,Double]
p: com.github.marklister.collections.io.CsvParser3[String,Int,Double] = com.github.marklister.collections.io.CsvParser3@1d8073f
scala> p.parseFile("sample.csv")
res2: com.github.marklister.collections.immutable.CollSeq3[String,Int,Double] =
CollSeq((Jan,10,22.33),
(Feb,20,44.2),
(Mar,25,55.1))
scala> val data="""10,"stuff",2.2
| 11,"otherstuff",3.0"""
data: String =
10,"stuff",2.211,"otherstuff",3.0
scala> val parsedData=CsvParser[Int,String,Double].parse(new java.io.StringReader(data))
parsedData: com.github.marklister.collections.immutable.CollSeq3[Int,String,Double] =
CollSeq((10,stuff,2.2),
(11,otherstuff,3.0))
scala> caseclass Foo (i:Int,s:String,d:Double)
defined class Foo
scala> CsvParser(Foo).parse(new java.io.StringReader(data))
res1: Seq[Foo] = List(Foo(10,stuff,2.2), Foo(11,otherstuff,3.0))
A Strongly typed Csv to Case Class, CollSeq[T1,T2,...Tn] Iterator[TupleN] or Iterator[Case Class] Parser. Use the companion object to instantiate the correct parser: