Class CsvOutput.CsvRowOutputWithHeaders
- java.lang.Object
- 
- com.opengamma.strata.collect.io.CsvOutput.CsvRowOutputWithHeaders
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableList<String>headers()Gets the list of headers that are in use.CsvOutput.CsvRowOutputWithHeaderswriteCell(String header, double value)Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.CsvOutput.CsvRowOutputWithHeaderswriteCell(String header, long value)Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.CsvOutput.CsvRowOutputWithHeaderswriteCell(String header, Object value)Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.CsvOutput.CsvRowOutputWithHeaderswriteCell(String header, String value)Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.CsvOutput.CsvRowOutputWithHeaderswriteCells(Map<String,String> valueMap)Writes a map of cells to the output, with the cell only being output whenwriteNewLine()is called.CsvOutput.CsvRowOutputWithHeaderswriteLine(Map<String,String> valueMap)Writes a row to the output, specifying each value by the header.CsvOutput.CsvRowOutputWithHeaderswriteNewLine()Writes a new line character.
 
- 
- 
- 
Method Detail- 
headerspublic ImmutableList<String> headers() Gets the list of headers that are in use.This is the same list that was passed into CsvOutput.withHeaders(List, boolean).- Returns:
- the list of headers
 
 - 
writeLinepublic CsvOutput.CsvRowOutputWithHeaders writeLine(Map<String,String> valueMap) Writes a row to the output, specifying each value by the header.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. This method is equivalent to multiple calls to writeCell(String, String)followed by one call towriteNewLine().- Parameters:
- valueMap- the map of values to write keyed by header
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeCellspublic CsvOutput.CsvRowOutputWithHeaders writeCells(Map<String,String> valueMap) Writes a map of cells to the output, with the cell only being output whenwriteNewLine()is called.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. This method is equivalent to multiple calls to writeCell(String, String).Note that if writeNewLine()is not called, the cell will never be output.- Parameters:
- valueMap- the map of values to write keyed by header
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeCellpublic CsvOutput.CsvRowOutputWithHeaders writeCell(String header, String value) Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. Note that if writeNewLine()is not called, the cell will never be output.- Parameters:
- header- the header to write
- value- the value to write
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeCellpublic CsvOutput.CsvRowOutputWithHeaders writeCell(String header, Object value) Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. Note that if writeNewLine()is not called, the cell will never be output.- Parameters:
- header- the header to write
- value- the value to write
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeCellpublic CsvOutput.CsvRowOutputWithHeaders writeCell(String header, double value) Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. Note that if writeNewLine()is not called, the cell will never be output.- Parameters:
- header- the header to write
- value- the value to write
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeCellpublic CsvOutput.CsvRowOutputWithHeaders writeCell(String header, long value) Writes a single cell by header, with the cell only being output whenwriteNewLine()is called.The header must exactly match the header passed into the constructor of this instance. An exception is thrown if the header is not known. Note that if writeNewLine()is not called, the cell will never be output.- Parameters:
- header- the header to write
- value- the value to write
- Returns:
- this, for method chaining
- Throws:
- IllegalArgumentException- if one of the headers does not match
- UncheckedIOException- if an IO exception occurs
 
 - 
writeNewLinepublic CsvOutput.CsvRowOutputWithHeaders writeNewLine() Writes a new line character.- Returns:
- this, for method chaining
- Throws:
- UncheckedIOException- if an IO exception occurs
 
 
- 
 
-