Object

kantan.csv

ops

Related Doc: package csv

Permalink

object ops

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ops
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class CsvInputOps[A] extends AnyVal

    Permalink

    Provides useful syntax for types that have implicit instances of CsvInput in scope.

    Provides useful syntax for types that have implicit instances of CsvInput in scope.

    The most common use case is to turn a value into a CsvReader through asCsvReader:

    val f: java.io.File = ???
    f.asCsvReader[List[Int]](',', true)

    A slightly less common use case is to load an entire CSV file in memory through readCsv:

    val f: java.io.File = ???
    f.readCsv[List, List[Int]](',', true)

    Unsafe versions of these methods are also available, even if usually advised against.

  2. implicit final class CsvOutputOps[A] extends AnyVal

    Permalink

    Provides useful syntax for that types that have implicit instances of CsvOutput in scope.

    Provides useful syntax for that types that have implicit instances of CsvOutput in scope.

    The most common use case is to turn a value into a CsvWriter through asCsvWriter:

    val f: java.io.File = ???
    f.asCsvWriter[List[Int]](',', true)

    A slightly less common use case is encode an entire collection to CSV through writeCsv:

    val f: java.io.File = ???
    f.writeCsv[List[Int]](List(List(1, 2, 3), List(4, 5, 6)), ',', true)
  3. implicit final class CsvReaderOps[A] extends AnyVal

    Permalink

    Provides useful syntax for CsvReader[ReadResult[A]].

    Provides useful syntax for CsvReader[ReadResult[A]].

    When parsing CSV data, a very common scenario is to get an instance of CsvReader and then use common combinators such as map and flatMap on it. This can be awkward when the actual interesting value is itself within a ReadResult which also needs to be mapped into. CsvReaderOps provides shortcuts, such as:

    val reader: CsvReader[ReadResult[List[Int]]] = ???
    
    // Not the most useful code in the world, but shows how one can map and filter directly on the nested value.
    reader.mapResult(_.sum).filterResult(_ % 2 == 0)
  4. implicit final class TraversableOnceOps[A] extends AnyVal

    Permalink

    Provides useful syntax for collections.

    Provides useful syntax for collections.

    The sole purpose of this implicit class is to encode collections as CSV into a string through asCsv:

    List(List(1, 2, 3), List(4, 5, 6)).asCsv(',')

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 clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped