- java.lang.Object
-
- org.ojalgo.netio.TextLineWriter.CSVLineBuilder
-
- Enclosing class:
- TextLineWriter
public static final class TextLineWriter.CSVLineBuilder extends java.lang.ObjectA reusable delimited "text line" builder. When writing CSV data this can help create the lines/rows. It's backed by theTextLineWriterused to instantiate it. Just specify the delimiter, once, and start creating lines/rows.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringmyDelimiterprivate java.lang.StringBuildermyTextLineprivate TextLineWritermyWriter
-
Constructor Summary
Constructors Constructor Description CSVLineBuilder(TextLineWriter writer, char delimiter)CSVLineBuilder(TextLineWriter writer, java.lang.String delimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextLineWriter.CSVLineBuilderappend(boolean colVal)TextLineWriter.CSVLineBuilderappend(byte colVal)TextLineWriter.CSVLineBuilderappend(char colVal)TextLineWriter.CSVLineBuilderappend(double colVal)TextLineWriter.CSVLineBuilderappend(float colVal)TextLineWriter.CSVLineBuilderappend(int colVal)TextLineWriter.CSVLineBuilderappend(long colVal)TextLineWriter.CSVLineBuilderappend(short colVal)TextLineWriter.CSVLineBuilderappend(java.lang.Object colVal)private voiddelimit()voidline(java.lang.Object... cols)voidwrite()Write the line/row and reset the builder – ready to build the next line.
-
-
-
Field Detail
-
myDelimiter
private final java.lang.String myDelimiter
-
myTextLine
private final java.lang.StringBuilder myTextLine
-
myWriter
private final TextLineWriter myWriter
-
-
Constructor Detail
-
CSVLineBuilder
CSVLineBuilder(TextLineWriter writer, char delimiter)
-
CSVLineBuilder
CSVLineBuilder(TextLineWriter writer, java.lang.String delimiter)
-
-
Method Detail
-
append
public TextLineWriter.CSVLineBuilder append(boolean colVal)
-
append
public TextLineWriter.CSVLineBuilder append(byte colVal)
-
append
public TextLineWriter.CSVLineBuilder append(char colVal)
-
append
public TextLineWriter.CSVLineBuilder append(double colVal)
-
append
public TextLineWriter.CSVLineBuilder append(float colVal)
-
append
public TextLineWriter.CSVLineBuilder append(int colVal)
-
append
public TextLineWriter.CSVLineBuilder append(long colVal)
-
append
public TextLineWriter.CSVLineBuilder append(java.lang.Object colVal)
-
append
public TextLineWriter.CSVLineBuilder append(short colVal)
-
line
public void line(java.lang.Object... cols)
-
write
public void write()
Write the line/row and reset the builder – ready to build the next line.
-
delimit
private void delimit()
-
-