de.esprit.common.io.csv

## Class CsvRecord

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.common.io.csv.CsvRecord

- All Implemented Interfaces:
    Clearable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    CodeStatRecord

      public class CsvRecord
      extends TransferableObject
      implements Clearable

  This class models a CSV record. The values are stored as a single text line, whereas the fields are separated by a delimiter character.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CsvRecord(char delimiter, java.lang.String... fieldNames)`
    `CsvRecord(java.lang.String... fieldNames)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears the content
    `int` | `getFieldCount()`
    `java.lang.String[]` | `getFieldNames()`
    `java.lang.String` | `getValue(int index)`
    `java.lang.String` | `getValue(java.lang.String fieldName)`
    `java.lang.String[]` | `getValues()`
    `java.lang.String` | `headLine()`
    `void` | `parse(java.lang.String line)`
    `void` | `setValue(java.lang.String fieldName, boolean value)`
    `void` | `setValue(java.lang.String fieldName, double value)`
    `void` | `setValue(java.lang.String fieldName, java.lang.Exception error)`
    `void` | `setValue(java.lang.String fieldName, long value)`
    `void` | `setValue(java.lang.String fieldName, java.lang.String value)` Sets the value for a particular fieldName
    `void` | `setValue(java.lang.String fieldName, java.sql.Timestamp ts)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `java.lang.String` | `toString()` Returns a single line String that shows the values of the most important state variables of this object.
    `java.lang.String` | `valueLine()`

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CsvRecord

          public CsvRecord(java.lang.String... fieldNames)

    - #### CsvRecord

          public CsvRecord(char delimiter,
                   java.lang.String... fieldNames)

  - ### Method Detail

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      java.lang.String value)

      Sets the value for a particular fieldName

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      long value)

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      double value)

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      boolean value)

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      java.lang.Exception error)

    - #### setValue

          public void setValue(java.lang.String fieldName,
                      java.sql.Timestamp ts)

    - #### getFieldNames

          public java.lang.String[] getFieldNames()

    - #### getValues

          public java.lang.String[] getValues()

    - #### getValue

          public java.lang.String getValue(int index)

    - #### getValue

          public java.lang.String getValue(java.lang.String fieldName)

    - #### getFieldCount

          public int getFieldCount()

    - #### headLine

          public java.lang.String headLine()

    - #### valueLine

          public java.lang.String valueLine()

    - #### clear

          public void clear()

      Description copied from interface: `Clearable`
      Clears the content
      Specified by:
        `clear` in interface `Clearable`

    - #### parse

          public void parse(java.lang.String line)

    - #### toString

          public java.lang.String toString()

      Description copied from interface: `Dumpable`
      Returns a single line String that shows the values of the most important state variables of this object. This is intentionally the same toString() method which is already provided by Object per se.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.